If a system is capable of handling 4 billion nodes in memory, a double
free could occur because of an unsigned integer overflow leading to a
realloc call with size argument of 0. Eventually, the client will
release that memory again, triggering a double free.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
int found_first_header;
char has_endarc_header;
struct data_block_offsets *dbo;
- unsigned int cursor;
- unsigned int nodes;
+ size_t cursor;
+ size_t nodes;
char filename_must_match;
/* LZSS members */
int whence)
{
int64_t client_offset, ret;
- unsigned int i;
+ size_t i;
struct rar *rar = (struct rar *)(a->format->data);
if (rar->compression_method == COMPRESS_METHOD_STORE)