Package: libarchive1
Version: 2.6.1-1
Severity: serious
Tags: patch

When using the old archive_read_open function of libarchive, it calls
libarchive_read_open2 with skipper set to NULL. But that functions
always adds a function calling this one as skipper for source stream.
Which leads to segfaults when the program requests a skip.

I'm setting severity to serious to avoid it migrating to testing, as
it makes reprepro segfault, see #516515.

Attached is a patch which fixes the issue for me.

Hochachtungsvoll,
        Bernhard R. Link
--- a/libarchive-2.6.1/libarchive/archive_read.c	2008-12-28 21:08:32.000000000 +0100
+++ b/libarchive-2.6.1/libarchive/archive_read.c	2009-02-22 13:51:48.000000000 +0100
@@ -189,7 +189,8 @@ archive_read_open2(struct archive *_a, v
 		source->archive = a;
 		source->data = client_data;
 		source->read = client_read_proxy;
-		source->skip = client_skip_proxy;
+		if (a->client.skipper != NULL)
+			source->skip = client_skip_proxy;
 		source->close = client_close_proxy;
 		a->source = source;
 	}

Reply via email to