Skip to content

Commit

Permalink
[crash] isprint() will fail with large values
Browse files Browse the repository at this point in the history
Related to #1389
  • Loading branch information
tstack committed Feb 14, 2025
1 parent ab57c05 commit 210548f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/breadcrumb_curses.cc
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ breadcrumb_curses::handle_key(const ncinput& ch)
case KEY_ESCAPE:
break;
default:
if (isprint(ch.id)) {
if (ch.id < 0x7f && isprint(ch.id)) {
this->bc_current_search.push_back(ch.id);
this->reload_data();
retval = true;
Expand Down
2 changes: 1 addition & 1 deletion src/input_dispatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ input_dispatcher::new_input(const struct timeval& current_time,
ch.modifiers,
ch.id,
ch.id,
isprint(ch.id) ? ch.id : ' ',
ch.id < 0x7f && isprint(ch.id) ? ch.id : ' ',
ch.utf8,
eff_str.c_str(),
ch.evtype);
Expand Down

0 comments on commit 210548f

Please sign in to comment.