# HG changeset patch # User Sergey Poznyakoff # Date 1118922754 0 # Node ID 7e72ef843d7330a31d990f43ee5c05d3acede6b9 # Parent 280b8d19043ce63af2038c9712b91c40e8ac5799 (__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 --- 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 @@ else { int __key = __opt->key; - return __key > 0 && isprint (__key); + return __key > 0 && __key <= UCHAR_MAX && isprint (__key); } }