Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: menuconfig: proper handling of NULL character as input #33347

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/kconfig/menuconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,9 @@ def edit_width():
_safe_curs_set(0)
return None

elif c == "\0": # \0 = NUL, ignore
pass

else:
s, i, hscroll = _edit_text(c, s, i, hscroll, edit_width())

Expand Down Expand Up @@ -2196,6 +2199,9 @@ def select_prev_match():
elif c == curses.KEY_HOME:
sel_node_i = scroll = 0

elif c == "\0": # \0 = NUL, ignore
pass

else:
s, s_i, hscroll = _edit_text(c, s, s_i, hscroll,
_width(edit_box) - 2)
Expand Down