lzop: Prevent integer overflow (#2174)
Cast to int64_t to cover all unsigned 32 bit values without running into issues with C standard.
This commit is contained in:
1 parent
dd8f50c317
commit
8bc1a3e66e
1 file changed
+2
-1
@@ -291,7 +291,8 @@ consume_header(struct archive_read_filter *self)
|
||||
if (p == NULL)
|
||||
goto truncated;
|
||||
len = archive_be32dec(p);
|
||||
__archive_read_filter_consume(self->upstream, len + 4 + 4);
|
||||
__archive_read_filter_consume(self->upstream,
|
||||
(int64_t)len + 4 + 4);
|
||||
}
|
||||
state->flags = flags;
|
||||
state->in_stream = 1;
|
||||
|
||||
Reference in new issue
Block a user