Skip to content

Commit

Permalink
Fix size calculation (missing parenthesis).
Browse files Browse the repository at this point in the history
  • Loading branch information
dillof committed Dec 15, 2017
1 parent 17485a2 commit e3e5573
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/zip_source_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ buffer_grow_fragments(buffer_t *buffer, zip_uint64_t capacity, zip_error_t *erro
}

if ((fragments = realloc(buffer->fragments, sizeof(buffer->fragments[0]) * capacity)) == NULL
|| (offsets = realloc(buffer->fragment_offsets, sizeof(buffer->fragment_offsets[0]) * capacity + 1)) == NULL) {
|| (offsets = realloc(buffer->fragment_offsets, sizeof(buffer->fragment_offsets[0]) * (capacity + 1))) == NULL) {
free(fragments);
zip_error_set(error, ZIP_ER_MEMORY, 0);
return false;
Expand Down

0 comments on commit e3e5573

Please sign in to comment.