Re: Public disclosure of discovered vulnerabilities
From: Douglas A. Gwyn (DAGwyn_at_null.net)
Date: 05/29/05
- Next message: Bryan Olson: "Re: Public disclosure of discovered vulnerabilities"
- Previous message: Andrew Swallow: "Re: DRMTICS 2005 Call for Papers"
- In reply to: Bryan Olson: "Re: Public disclosure of discovered vulnerabilities"
- Next in thread: Bryan Olson: "Re: Public disclosure of discovered vulnerabilities"
- Reply: Bryan Olson: "Re: Public disclosure of discovered vulnerabilities"
- Reply: Bryan Olson: "Re: Public disclosure of discovered vulnerabilities"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 29 May 2005 16:31:32 -0400
> Douglas A. Gwyn wrote:
> > Bryan Olson wrote:
> >> Negative character codes are consistent with the C standard,
> >> and common systems,
> > No. The value '0xC0' (EBCDIC code for the character '0',
> > as I recall) is the *positive* decimal value 192 on *all*
> > conforming C implementations.
To avoid confusion, I meant the numerical value 0xC0;
I shouldn't have put quotes around it since I didn't
intend to suggest a C "integer character constant",
but rather (as I said and illustrated by an example)
the code value obtained from an external file.
(There is contradictory wording in the C standard
about the value of such an integer character constant,
which has type int, but an example indicates that the
intent was that the value of an *integer character
constant* might be negative. The contradiction is that
initially the value is specified as the hex value,
i.e. decimal 192, but then in semantics it is said
that the value of the integer character constant would
be what is obtained by converting a char that has that
value to int. Of course when 8-bit char is signed
there is no way for a char to represent that value.
The peculiar semantics are again meant to allow the
accidental behavior of some existing pre-standard
implementations.)
> So quote the standard and show me wrong.
I have copies of several character coding standards,
and none of them assign negative values to code points.
The C standard spec for fgetc is quite explicit about
avoiding sign extension, which is why you get the
unmolested code value upon input. (This is essential
anyway, as allowing a "signed char knothole" to occur
here would allow two distinct external code values to
be mapped to the same integer value upon input, on any
platform other than twos-complement.)
- Next message: Bryan Olson: "Re: Public disclosure of discovered vulnerabilities"
- Previous message: Andrew Swallow: "Re: DRMTICS 2005 Call for Papers"
- In reply to: Bryan Olson: "Re: Public disclosure of discovered vulnerabilities"
- Next in thread: Bryan Olson: "Re: Public disclosure of discovered vulnerabilities"
- Reply: Bryan Olson: "Re: Public disclosure of discovered vulnerabilities"
- Reply: Bryan Olson: "Re: Public disclosure of discovered vulnerabilities"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|