bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: rm -rf and readdir bug in coreutils-6.7


From: Jim Meyering
Subject: Re: PATCH: rm -rf and readdir bug in coreutils-6.7
Date: Sat, 23 Dec 2006 01:46:55 +0100

Mikulas Patocka <address@hidden> wrote:
>> So far, your patch looks fine, modulo the fact that it makes
>> AD_pop_and_chdir set *dirp = NULL unconditionally -- better to change its
>> signature in that case.  I'll look at it more closely today or tomorrow.
>> Also, since the modified function no longer even calls fdopendir, the
>> "_and_chdir" part of its name is truly inaccurate.  Good excuse to rename.
>
> Code surely needs cleanup, I tried to make patch the smallest. You don't
> have to pass double pointer to AD_pop_and_chdir at all, DIR *dirp would be
> enough, and you can set it to NULL in the caller. Setting to NULL is

Of course.  That is what my comment about changing the function
signature was meant to convey.

> needed because of error path. Also you can test longjmp error branch, if
> you commit it (I just copied it but did not test if all gets released
> right on it).

This will be fixed for the next release.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]