# HG changeset patch # User reimar # Date 1409856856 0 # Node ID 2c223acee2db9a5b305e86c05489d31fe0299377 # Parent 04f2b82fc98f6cffe49e416270e0092a1687938d Ensure isprint only gets input it can handle. Patch by [spunit262 gmail.com]. diff -r 04f2b82fc98f -r 2c223acee2db input/input.c --- a/input/input.c Thu Sep 04 17:55:42 2014 +0000 +++ b/input/input.c Thu Sep 04 18:54:16 2014 +0000 @@ -1472,7 +1472,7 @@ return key_names[i].name; } - if(isprint(key)) { + if(0 <= key && key <= 255 && isprint(key)) { snprintf(key_str,12,"%c",(char)key); return key_str; }