On Fri, Aug 17, 2007 at 02:05:28PM +0300, Sergey Poznyakoff wrote: > Dmitry V. Levin ha escrit: > > > My suggestion is to avoid using alloca() with user controllable size. > > In this particular case, memcpy() call could be optimized out as well. > > The proposed patch will make things worse: tar will segfault, because > the passed string is freed after inserting it in the hash table.
Sergey, have you looked at the patch? I do not suggest to remove xstrdup completely, just replace it with xmalloc; nothing more, nothing less. -- ldv
pgpHnphDmKnjh.pgp
Description: PGP signature
