I: [PATCH] few asprintf error handling fixes
Roland McGrath
roland@redhat.com
Wed Jun 2 19:14:00 GMT 2004
> On Tue, Jun 01, 2004 at 05:48:57PM -0700, Roland McGrath wrote:
> > > The current behavior is undefined behavior, the result pointer after
> > > failed asprintf call may contain any value, e.g. pointer to already freed
> > > memory. I'm doubt that some programs could depend on this behavior.
> >
> > You mean that actually happens now?
>
> Yes.
In that case any program that would be broken is working by pure luck and
not just ambiguous definition. I think it would be fine to change asprintf.
More information about the Libc-alpha
mailing list