]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Remove unneeded length check to avoid the potential of a dereference of
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 4 Oct 2014 15:11:04 +0000 (00:11 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 4 Oct 2014 15:16:04 +0000 (00:16 +0900)
null pointer.

libarchive/archive_write_add_filter_lz4.c

index 309a8ae00be6ea6c56ce4f688877cc264de2a5a1..87b3f552eba978c6907e47003ed258483f5a3920 100644 (file)
@@ -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;