Re: Validate a pointer

From: Bryan Bullard (replay_at_to.group.com)
Date: 12/10/04


Date: Fri, 10 Dec 2004 20:00:13 GMT


"Måns Rullgård" <mru@inprovide.com> wrote in message
news:yw1xis7a3uqy.fsf@ford.inprovide.com...
> "Bryan Bullard" <replay@to.group.com> writes:
>
> > Hi, what the most UNIX standard way of validating that an address can be
> > read or written to?
>
> Writing your program in such a way that you know what your pointers
> are pointing to in the first place. Anything else is bound to break
> in some situation.

This is for a library that needs to test the range of a pointer that the
caller passes.



Relevant Pages

  • Re: Why is standard library hidden?
    ... >I realy wish I had never heard of pointers and dynamic memory because I ... >more I get into writing programs I find it is like writing a good paper ... >more than enything I ever learned in math classes. ... Computer programming, IMHO, is a lot closer to doing "logic puzzles" than ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Storing Variable State
    ... > the ability to save the state of the system and replay ... > each of which can contain a number of pointers to other objects and ... Registered Linux User #71917 http://counter.li.org ... Writing them is worse. ...
    (comp.lang.cpp)
  • Re: current address
    ... It should be reasonably safe if the structs are read in by the same ... If the pointers are written and then read back in during the same ... there's little to be gained by writing them to files and reading them ... where a computational job can easily run for ...
    (comp.lang.c)
  • Re: Help with container.
    ... >> I wrote this simple stripped down version of a container. ... I am writing ... >> it for practice using pointers. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Network traffic capture, and rotating files with compression
    ... >method then restart writing a new file for the new day - and continue doing ... >Any help or pointers would be appreciated especially regarding script ... >writing to make it log to file, stop, compress then carry on in a new file. ... installed site-wide spam filters at catherders.com. ...
    (comp.os.linux.networking)