On 09/20/10 00:49, Kamil Dudka wrote: > I must admit I don't understand much the code, but the attached patch at > least > solves the reported crash. Thanks in advance for review!
Thanks, I installed the following (slightly different) patch. Sergey needs to take a look at this one for the "right" patch; this is just a workaround. >From 8898730722d2dc30d4d1ba9104515004f0adbfed Mon Sep 17 00:00:00 2001 From: Paul Eggert <[email protected]> Date: Mon, 20 Sep 2010 11:34:33 -0700 Subject: [PATCH] tar: do not crash with --listed-incremental Problem reported by Frantisek Hanzlik in <https://bugzilla.redhat.com/635318> via Kamil Dudka in <http://lists.gnu.org/archive/html/bug-tar/2010-09/msg00066.html>. I don't understand this code either, but Sergey can take a look at this patch, and perhaps install a better one, when he has the time. * src/incremen.c (append_incremental_renames): Don't actually append anything to DIR if DIR is null. --- src/incremen.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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); -- 1.7.2
