Hello!
Mike, after I posted in brief my discovery to the Cygwin list, I
received back two responses, the first suggested that there was
something outright wrong with the code, and ideally the individual did
not properly cite any reasons. He insists his reasons come from SUSv3
whatever that is. Further he didn't cite specfics from either the code
that exploded from our SVN array.

But the second one which I am forwarding there gave more reasons and
even chose anexample code blurb from ours to cite his reasons why it
should be changed to accomodate things and not cause that event spiral
that I brought to the attention of the list itself.

I still think there are plenty of reasons why the group at Cygwin
should change theirs accordingly, but the fact that it worked on my
Linux system, and some of the libraries on it are found in Cygwin,
except the Libc from GNU, they are using the new lib library with it
instead, suggests that there will always be a conflict someplace.

Besides this is from the trunk of the program, and not yet ready to be
released, right? Probably when all of us believe it is, it will mean
that the problem will be properly fixed, in some fashion.
-----
Gregg C Levine [email protected]
"This signature fought the Time Wars, time and again."


---------- Forwarded message ----------
From: Greg Chicares <[email protected]>
Date: Fri, Jul 9, 2010 at 12:57 AM
Subject: Re: Interesting discovery in the C library that Cygwin uses
To: [email protected]


On 2010-07-08 23:34Z, Gregg Levine wrote:
> I made this discovery whilst building the urjtag program from its SVN trunk:
> make[3]: Entering directory `/usr/local/urjtag/urjtag/trunk/urjtag/src/tap'
>  CC     tap.lo
>  CC     register.lo
>  CC     state.lo
>  CC     chain.lo
>  CC     detect.lo
> detect.c: In function `find_record':
> detect.c:89: warning: array subscript has type `char'

http://urjtag.svn.sourceforge.net/viewvc/urjtag/trunk/urjtag/src/tap/detect.c?annotate=1799
   char *p;
   ...
   while (*p && isspace (*p))

The problem is that 'char' can be signed, and a signed quantity can
be negative. But values passed to <ctype.h> functions like isspace()
have to be in the (nonnegative) range of an unsigned char (or be
equal to EOF); otherwise, the behavior is undefined. Consider using
   unsigned char *p;
instead of
   char *p;
in the example above.

Here's some discussion:

https://www.securecoding.cert.org/confluence/display/seccode/STR37-C.+Arguments+to+character+handling+functions+must+be+representable+as+an+unsigned+char

http://old.nabble.com/warnings-from-use-of-ctype.h-methods-td27865685.html

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to