[MPlayer-cvslog] r37265 - trunk/input/input.c

reimar subversion at mplayerhq.hu
Thu Sep 4 20:54:16 CEST 2014


Author: reimar
Date: Thu Sep  4 20:54:16 2014
New Revision: 37265

Log:
Ensure isprint only gets input it can handle.

Patch by [spunit262 gmail.com].

Modified:
   trunk/input/input.c

Modified: trunk/input/input.c
==============================================================================
--- trunk/input/input.c	Thu Sep  4 19:55:42 2014	(r37264)
+++ trunk/input/input.c	Thu Sep  4 20:54:16 2014	(r37265)
@@ -1472,7 +1472,7 @@ mp_input_get_key_name(int key) {
       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;
   }


More information about the MPlayer-cvslog mailing list