Bug 5326 - isspace bugs in poptconfig.c, poptparse.c, popthelp.c
Summary: isspace bugs in poptconfig.c, poptparse.c, popthelp.c
Status: RESOLVED FIXED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: x86 (IA32) All
: high normal
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-13 08:48 UTC by M Welinder
Modified: 2012-05-14 14:32 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description M Welinder 2005-12-13 08:48:24 UTC
isspace (etc.) should never be called with an argument of type char.
Such arguments might be negative which, apart from EOF, is invalid.
Values of type char need to be cast to unsigned char.

[These warnings are produced by gcc on solaris 2.8, for example:]
poptconfig.c:60: warning: subscript has type `char'
poptconfig.c:61: warning: subscript has type `char'
poptconfig.c:64: warning: subscript has type `char'
poptconfig.c:66: warning: subscript has type `char'
poptconfig.c:70: warning: subscript has type `char'
poptconfig.c:72: warning: subscript has type `char'
poptconfig.c:137: warning: subscript has type `char'
poptparse.c:74: warning: subscript has type `char'
popthelp.c:112: warning: subscript has type `char'
popthelp.c:114: warning: subscript has type `char'
popthelp.c:120: warning: subscript has type `char'
Comment 1 Dan Nicholson 2012-05-14 14:32:58 UTC
Fixed with popt removal in commit fd4d40b. Please reopen if this is still an issue.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.