This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: snprintf and sprintf act differenting when writing to an argument


abakun@reac.com writes:

> >Description: The results of sprintf and snprintf are not the same
> when passing a source string argument that is also the destiniation
> string.  Specificly, when the destination string argument is also
> specified as a source string, sprintf allows this, and snprintf
> clears the destiniation string first.

And your point?  This is completely unspecified.  The implementation
would even be allows to clear the whole output string before writing
to it.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]