Re: Is memcpy secure?

From: Walter Roberson (roberson_at_ibd.nrc-cnrc.gc.ca)
Date: 01/29/04


Date: 29 Jan 2004 20:11:26 GMT

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.

-- 
I predict that you will not trust this prediction.


Relevant Pages

  • Re: Is memcpy secure?
    ... Christian Bau wrote: ... : roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote: ... :> and guarantees that if you convert a pointer to a long and back ... I predict that you will not trust this prediction. ...
    (comp.lang.c)
  • Re: comparison function for qsort() question
    ... Walter Roberson wrote: ... David Mathog wrote: ... zero on a call to that function. ... pointer arguments on such a call shall ...
    (comp.lang.c)
  • Re: mouse
    ... Sebastian G wrote: ... Set the figure property 'Pointer' to 'watch'. ...
    (comp.soft-sys.matlab)
  • Re: NULL with representation other then all bits 0
    ... > Christian Bau wrote: ... Saying that a pointer is zero is pure nonsense. ... >> language that in this kind of situation, integer constants of value 0 ...
    (comp.lang.c)
  • Re: Is memcpy secure?
    ... roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote: ... > and guarantees that if you convert a pointer to a long and back ... > again (with no arithmetic operations on the long) then the result ... C Standard. ...
    (comp.lang.c)

Quantcast