[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] progname: don't segfault when argv is NULL
From: |
Pádraig Brady |
Subject: |
Re: [PATCH] progname: don't segfault when argv is NULL |
Date: |
Sat, 05 Dec 2009 00:19:38 +0000 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Bruno Haible wrote:
> Hi Jim,
>
>> Ok to apply the patch below?
>> Without it, anyone can make nearly any coreutils program segfault
>> with this simple recipe:
>>
>> printf '%s\n' '#include <unistd.h>' 'int main(int c, char**v)' \
>> '{ execve (v[1], 0, 0); }' > k.c && gcc k.c && ./a.out /bin/cat
Unfortunately you can still make the programs segfault
by passing 1 rather than 0 for example. We've only seen
NULL for now, but I'm not sure what's actually doing that,
or how common it is.
cheers,
Pádraig.
- [PATCH] progname: don't segfault when argv is NULL, Jim Meyering, 2009/12/04
- Re: [PATCH] progname: don't segfault when argv is NULL, Bruno Haible, 2009/12/04
- Re: [PATCH] progname: don't segfault when argv is NULL,
Pádraig Brady <=
- Re: [PATCH] progname: don't segfault when argv is NULL, Eric Blake, 2009/12/04
- Re: [PATCH] progname: don't segfault when argv is NULL, Jim Meyering, 2009/12/05
- Re: [PATCH] progname: don't segfault when argv is NULL, Jim Meyering, 2009/12/06
- __nonnull__ declarations, Bruno Haible, 2009/12/06
- Re: __nonnull__ declarations, Jim Meyering, 2009/12/07
- Re: __nonnull__ declarations, Bruno Haible, 2009/12/10