From 080ae421114cf27b58b2879507b24852fd9947c5 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 16 Jun 2005 11:52:34 +0000 Subject: [PATCH] (__option_is_short): Check upper limit of __key. Isprint() requires its argument to have the value of an unsigned char or EOF. --- lib/argp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } -- 2.30.2