This is the mail archive of the
libc-alpha@cygnus.com
mailing list for the glibc project.
Re: snprintf and sprintf act differenting when writing to an argument
- To: abakun@reac.com
- Subject: Re: snprintf and sprintf act differenting when writing to an argument
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 16 Feb 1999 08:44:26 -0800
- Cc: libc-alpha@cygnus.com
- References: <199902161613.KAA03426@jupiter.reac.com>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
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 `------------------------