[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feedback on 1..3 [Re: [PATCH 0/6]
From: |
Jim Meyering |
Subject: |
feedback on 1..3 [Re: [PATCH 0/6] |
Date: |
Fri, 05 Mar 2010 14:59:06 +0100 |
Hi Paolo,
Thanks for all the work.
Paolo Bonzini wrote:
> Subject: [PATCH 1/6] fix for bug 21276
>
> * lib/savedir.c (isdir1): Use realloc instead of calloc. Remove
> dead code.
> (savedir): Do not leak name_space if allocation of new_name_space fails.
...
I hesitated to address that error-path leak and deliberately avoided
changing savedir.c, because I want to remove savedir.c altogether
and use gnulib's fts.c for the hierarchy traversal.
But the changes look fine, so ACK.
> Subject: [PATCH 2/6] eliminate invalid "ptr += (ptr2 - ptr1)"
>
> * lib/savedir.c (savedir): new_name_space and name_space do not point into
> the same object, so computing their difference is invalid. Similarly,
> summing the difference to namep is invalid because namep and the result
> point into different objects. Avoid this.
...
This is a copy of savedir.c from long ago.
The master copy (in gnulib) has evolved significantly
since they diverged. I would have removed it when I hooked
up gnulib, here, but grep relies on a different API, and
it's not worth trying to fix that now.
> - namep += new_name_space - name_space;
> + namep = new_name_space + (namep - name_space);
This change looks safe.
ACK.
> Subject: [PATCH 3/6] convert AUTHORS file to UTF-8
>
> * AUTHORS: Convert to UTF-8.
> ---
> AUTHORS | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/AUTHORS b/AUTHORS
> index 3d7ab74..17ebade 100644
> --- a/AUTHORS
> +++ b/AUTHORS
> @@ -46,7 +46,7 @@ send me email.
>
> Alain Magloire maintained GNU grep until version 2.5e.
>
> -Bernhard "Bero" Rosenkränzer <address@hidden> maintained GNU grep until
> +Bernhard "Bero" Rosenkränzer <address@hidden> maintained GNU grep until
> version 2.5.1, ie. from Sep 2001 till 2003.
ACK, but please add something like at the bottom of that file:
;; Local Variables:
;; coding: utf-8
;; End:
------------------
I'll reply to the remaining patches separately.