On Friday, July 09, 2010 01:45:52 Gregg Levine wrote:
> 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.

this is what he is talking about:
http://www.opengroup.org/onlinepubs/9699919799/functions/isspace.html

there's no logic in there that says a 7bit char value is invalid

> 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.

trunk is stable.  no reason we couldnt cut a urjtag-0.20 today.

> 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.

normally that's a fine argument, but we have full control over the incoming 
strings and they're going to all be 7bit ASCII, so the signed issue is 
irrelevant.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
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