[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack
From: |
Dmitry V. Levin |
Subject: |
Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow |
Date: |
Fri, 17 Aug 2007 15:10:21 +0400 |
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
pgpiwphJxYxiq.pgp
Description: PGP signature
- [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow, Dmitry V. Levin, 2007/08/16
- Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow, Ladislav Michnovič, 2007/08/17
- Re: [Bug-tar] Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow, Sergey Poznyakoff, 2007/08/17
- Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow, Dmitry V. Levin, 2007/08/17
- Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow, Ladislav Michnovič, 2007/08/17
- Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow, Ladislav Michnovič, 2007/08/21
- Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow, Dmitry V. Levin, 2007/08/22
- Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow, Ladislav Michnovič, 2007/08/23
- Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow, Dmitry V. Levin, 2007/08/23
Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow, Sergey Poznyakoff, 2007/08/17
- Re: [Bug-cpio] [PATCH] lib/paxnames.c: Do not use alloca to avoid stack overflow,
Dmitry V. Levin <=