Re: Is memcpy secure?
From: Dan Pop (Dan.Pop_at_cern.ch)
Date: 01/30/04
- Next message: JWMeritt: "Re: Question for someone CISSP certified."
- Previous message: BLH: "Re: Public/Private network split."
- In reply to: J. J. Farrell: "Re: Is memcpy secure?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 30 Jan 2004 12:14:55 GMT
In <5c04bc56.0401291616.616c8411@posting.google.com> jjf@bcs.org.uk (J. J. Farrell) writes:
>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in message news:<bvbo2b$ctu$1@canopus.cc.umanitoba.ca>...
>>
>> ANSI C -defines- long as being large enough to hold a pointer,
>> and guarantees that if you convert a pointer to a long and back
>> again (with no arithmetic operations on the long) then the result
>> will point to the original object.
>
>I don't believe it does. It allows pointers to be converted to
>integers in implementation-defined ways. It's not clear to me
>that it requires that a big enough integer exists (in C89 at
>least) and I'd welcome chapter and verse if it does.
Neither standard requires the existence of such an integer type.
C99 provides the *optional* intptr_t and uintptr_t aliases to the
signed and unsigned flavours of an integer type that is large enough
for the purpose and on which conversions back and forth reproduce
the original value. The aliases are optional because the underlying
types need not exist.
Dan
-- Dan Pop DESY Zeuthen, RZ group Email: Dan.Pop@ifh.de
- Next message: JWMeritt: "Re: Question for someone CISSP certified."
- Previous message: BLH: "Re: Public/Private network split."
- In reply to: J. J. Farrell: "Re: Is memcpy secure?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|