Skip to content

Commit

Permalink
size check
Browse files Browse the repository at this point in the history
  • Loading branch information
knok committed Jul 8, 2019
1 parent 2df6437 commit 9861272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fromsixel.c
Expand Up @@ -290,7 +290,7 @@ image_buffer_resize(

size = (size_t)(width * height);
alt_buffer = (unsigned char *)sixel_allocator_malloc(allocator, size);
if (alt_buffer == NULL) {
if (alt_buffer == NULL || size == 0) {
/* free source image */
sixel_allocator_free(allocator, image->data);
image->data = NULL;
Expand Down

0 comments on commit 9861272

Please sign in to comment.