Re: Is memcpy secure?
From: Mark McIntyre (markmcintyre_at_spamcop.net)
Date: 01/29/04
- Next message: Thomas Hertel: "Re: Public/Private network split."
- Previous message: Walter Roberson: "Re: Is memcpy secure?"
- In reply to: Walter Roberson: "Re: Is memcpy secure?"
- Next in thread: J. J. Farrell: "Re: Is memcpy secure?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 29 Jan 2004 20:30:33 +0000
On 29 Jan 2004 20:11:26 GMT, in comp.lang.c ,
roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote:
>In article <christian.bau-8F210D.20071129012004@slb-newsm1.svr.pol.co.uk>,
>Christian Bau <christian.bau@cbau.freeserve.co.uk> wrote:
>:In article <bvbo2b$ctu$1@canopus.cc.umanitoba.ca>,
>: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote:
>
>:> 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.
>
>:That is news to me. And to many others. Including the guys who wrote the
>:C Standard.
>
>I'll cross-check my references when I next have an opportunity.
The standard says:
6.3.2.3 Pointers
(6) Any pointer type may be converted to an integer type. Except as
previously specified, the result is implementation-defined. If the
result cannot be represented in the integer type, the behavior is
undefined. The result need not be in the range of values of any
integer type.
The "previously specified" refers to null pointers.
-- Mark McIntyre CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html> CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html> ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
- Next message: Thomas Hertel: "Re: Public/Private network split."
- Previous message: Walter Roberson: "Re: Is memcpy secure?"
- In reply to: Walter Roberson: "Re: Is memcpy secure?"
- Next in thread: J. J. Farrell: "Re: Is memcpy secure?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|