From: Sergey Poznyakoff Date: Thu, 16 Jun 2005 11:52:34 +0000 (+0000) Subject: (__option_is_short): Check upper limit of __key. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=080ae421114cf27b58b2879507b24852fd9947c5;p=pspp (__option_is_short): Check upper limit of __key. Isprint() requires its argument to have the value of an unsigned char or EOF. --- diff --git a/lib/argp.h b/lib/argp.h index 9bd2030ff4..f06542aeb5 100644 --- a/lib/argp.h +++ b/lib/argp.h @@ -23,6 +23,7 @@ #include #include #include +#include #define __need_error_t #include @@ -579,7 +580,7 @@ __NTH (__option_is_short (__const struct argp_option *__opt)) else { int __key = __opt->key; - return __key > 0 && isprint (__key); + return __key > 0 && __key <= UCHAR_MAX && isprint (__key); } }