bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] [PATCH] tar: do not crash with --listed-incremental


From: Kamil Dudka
Subject: Re: [Bug-tar] [PATCH] tar: do not crash with --listed-incremental
Date: Mon, 20 Sep 2010 21:04:28 +0200
User-agent: KMail/1.9.10

On Monday 20 September 2010 20:37:18 Paul Eggert wrote:
> diff --git a/src/incremen.c b/src/incremen.c
> index c6d4f4c..4d86ed7 100644
> --- a/src/incremen.c
> +++ b/src/incremen.c
> @@ -890,7 +890,8 @@ append_incremental_renames (struct directory *dir)
>    for (dp = dirhead; dp; dp = dp->next)
>      store_rename (dp, &stk);
>
> -  if (obstack_object_size (&stk) != size)
> +  /* FIXME: Is this the right thing to do when DIR is null?  */
> +  if (dir && obstack_object_size (&stk) != size)
>      {
>        obstack_1grow (&stk, 0);
>        dumpdir_free (dir->dump);

You're right.  I left there a call of obstack_1grow() for nothing.  Now I 
finally found its documentation in order to understand what it does, although 
it's not the gnulib's one:

http://gcc.gnu.org/onlinedocs/libiberty/Growing-Objects.html

Thank you for looking at the issue!

Kamil



reply via email to

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