I: [PATCH] realloc-related memory leaks fixes
Dmitry V. Levin
ldv@alt-linux.org
Sat Dec 29 02:33:00 GMT 2001
On Fri, Dec 28, 2001 at 10:05:42AM -0800, Ulrich Drepper wrote:
> > > - __argz_add_sep() contains possible memory leak; its semantics differs
> > > from other argz functions (patch attached);
>
> Something like this is completely unacceptable. The self-acclaimed
Your reaction is easy to predict. :)
That's why I've sent this patch as separate file.
> semantic police has no right to change an ABI.
Right now, argz_add_sep semantics concerning memory allocation isn't well
defined. For example, it's unclear, whether library or user should free
memory in case of realloc failure. Current argz_add_sep implementation
simply zeroes pointer provided by user but doesn't care of memory itself.
Either code or docs should be changed anyway.
P.S. Since possible memory leaks in argz_* functions don't like to have
security implications, I don't really care of them.
Regards,
Dmitry
+-------------------------------------------------------------------------+
Dmitry V. Levin mailto://ldv@alt-linux.org
ALT Linux Team http://www.altlinux.ru/
Fandra Project http://www.fandra.org/
+-------------------------------------------------------------------------+
UNIX is user friendly. It's just very selective about who its friends are.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20011229/852893c7/attachment.sig>
More information about the Libc-alpha
mailing list