Re: Public disclosure of discovered vulnerabilities
From: Bryan Olson (fakeaddress_at_nowhere.org)
Date: 05/31/05
- Next message: Michael Brown: "Re: (new?) factorization technique"
- Previous message: Unruh: "Re: Real-time sound cyphering algorithm"
- In reply to: Gregory G Rose: "Re: Public disclosure of discovered vulnerabilities"
- Next in thread: Nicol So: "Re: Public disclosure of discovered vulnerabilities"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 31 May 2005 07:16:17 GMT
Gregory G Rose wrote:
> Unless I'm very much mistaken, 'x' is a constant
> of type int, and will always have a positive
> value.
On that, I now believe you are "not mistaken", A.K.A. 'correct'.
It is a constant; it is of type int; and as a member of the
basic characters set, the standard implies it must have a
positive value, as Bodo pointed out.
The same is not true of '$'. It is a constant; it is of type
int; but (someone correct me if I'm wrong) the standard allows
it to have a negative value.
> It's only when it's assigned to a char
> variable, which may or may not be signed, that the
> problem creeps in.
In the case of a basic character set member such as 'x', there
is no such problem. In the case of '$', there is, and no
explicit assignment is required to exhibit the problem. One
might reasonably expect:
("$"[0] == '$')
to evaluate as true. Does the standard ensure it?
The case I got wrong was whether '0' could be a negative value.
Bodo showed that no, it must be positive. That surprised me
because it implies that no legal C implementation can do all of:
use EBCDIC encoding for basic characters,
use a char type that is signed,
use a char type that is 8-bit.
Any two of those seem legal, all three are not.
-- --Bryan
- Next message: Michael Brown: "Re: (new?) factorization technique"
- Previous message: Unruh: "Re: Real-time sound cyphering algorithm"
- In reply to: Gregory G Rose: "Re: Public disclosure of discovered vulnerabilities"
- Next in thread: Nicol So: "Re: Public disclosure of discovered vulnerabilities"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|