diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2014-10-05 00:11:04 +0900 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2014-10-05 00:16:04 +0900 |
commit | b7074cd33a80d8a3625534922a3d3f6e805175c9 (patch) | |
tree | 3d29ac0864e0c7eba49ffd8d2eac4ac63fdb7f06 /libarchive/archive_write_add_filter_lz4.c | |
parent | e352977de046ba4f139f1e4c29868c8c0ca0a526 (diff) | |
download | libarchive-b7074cd33a80d8a3625534922a3d3f6e805175c9.tar.gz |
Remove unneeded length check to avoid the potential of a dereference of
null pointer.
Diffstat (limited to 'libarchive/archive_write_add_filter_lz4.c')
-rw-r--r-- | libarchive/archive_write_add_filter_lz4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libarchive/archive_write_add_filter_lz4.c b/libarchive/archive_write_add_filter_lz4.c index 309a8ae0..87b3f552 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; |