Re: tmpfile alternative

From: Richard Kettlewell (rjkat_private)
Date: Mon Jan 07 2002 - 01:10:49 PST

  • Next message: Brass, Phil (ISS Atlanta): "RE: DLL Watching"

    Christian Recktenwald <secprog-distat_private> writes:
    > zoppiat_private wrote:
    
    >>   memset (filename, '\0', sizeof (filename));
    >>   snprintf (filename, sizeof (filename), "%s%s", appname, b.data);
    > 
    > you may write one byte LESS than your array has bytes (trailing \0),
    > you defined PATH_MAX to 1024 so filename may be 1023 chars maximum.
    
    I think you are confused.  The size argument to snprintf includes the
    terminating 0.
    
    -- 
    http://www.greenend.org.uk/rjk/
    



    This archive was generated by hypermail 2b30 : Tue Jan 08 2002 - 09:15:21 PST