2 parents 048b41d + b5522e1 commit 1af6800Copy full SHA for 1af6800
1 file changed
src/fromsixel.c
@@ -290,7 +290,7 @@ image_buffer_resize(
290
291
size = (size_t)(width * height);
292
alt_buffer = (unsigned char *)sixel_allocator_malloc(allocator, size);
293
- if (alt_buffer == NULL) {
+ if (alt_buffer == NULL || size == 0) {
294
/* free source image */
295
sixel_allocator_free(allocator, image->data);
296
image->data = NULL;
0 commit comments