[Bug bzip2/28283] New: undefined behavior for isdigit and isspace
roland.illig at gmx dot de
sourceware-bugzilla@sourceware.org
Fri Aug 27 17:31:37 GMT 2021
https://sourceware.org/bugzilla/show_bug.cgi?id=28283
Bug ID: 28283
Summary: undefined behavior for isdigit and isspace
Product: bzip2
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: bzip2
Assignee: nobody at sourceware dot org
Reporter: roland.illig at gmx dot de
CC: bzip2-devel at sourceware dot org
Target Milestone: ---
The functions from <ctype.h> take an int as parameter. The value of this
parameter must "either be representable as an unsigned char or be the value of
the macro EOF".
The functions addFlagsFromEnvVar and bzopen_or_bzdopen wrongly cast the
argument to Int32, the correct type is UChar. After a direct cast to Int32, the
argument may still be negative, which makes that cast wrong.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Bzip2-devel
mailing list