From: Michihiro NAKAJIMA Date: Sat, 4 Oct 2014 15:11:04 +0000 (+0900) Subject: Remove unneeded length check to avoid the potential of a dereference of X-Git-Tag: v3.1.900a~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7074cd33a80d8a3625534922a3d3f6e805175c9;p=thirdparty%2Flibarchive.git Remove unneeded length check to avoid the potential of a dereference of null pointer. --- diff --git a/libarchive/archive_write_add_filter_lz4.c b/libarchive/archive_write_add_filter_lz4.c index 309a8ae00..87b3f552e 100644 --- a/libarchive/archive_write_add_filter_lz4.c +++ b/libarchive/archive_write_add_filter_lz4.c @@ -418,7 +418,7 @@ lz4_write_one_block(struct archive_write_filter *f, const char *p, struct private_data *data = (struct private_data *)f->data; ssize_t r; - if (p == NULL && length == 0) { + if (p == NULL) { /* Compress remaining uncompressed data. */ if (data->in_buffer == data->in) return 0;