]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Merge r715 from trunk: Don't crash if the client fails to
authorTim Kientzle <kientzle@gmail.com>
Thu, 26 Feb 2009 04:44:08 +0000 (23:44 -0500)
committerTim Kientzle <kientzle@gmail.com>
Thu, 26 Feb 2009 04:44:08 +0000 (23:44 -0500)
provide a skip function.  Trunk has also added a test for
this which I didn't merge.

SVN-Revision: 716

libarchive/archive_read.c

index a1f40238f6a8ff58b00baed321091d607bb9cd58..f291c6286140e251860bff332a80a42295eeef7d 100644 (file)
@@ -126,6 +126,8 @@ client_read_proxy(struct archive_read_source *self, const void **buff)
 static int64_t
 client_skip_proxy(struct archive_read_source *self, int64_t request)
 {
+       if (self->archive->client.skipper == NULL)
+               return (0);
        return (self->archive->client.skipper)((struct archive *)self->archive,
            self->data, request);
 }