This is the mail archive of the libc-alpha@sources.redhat.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]
Other format: [Raw text]

Re: I: [PATCH] realloc-related memory leaks fixes


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.

Attachment: msg00178/pgp00000.pgp
Description: PGP signature


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