Skip to content

Commit 1af6800

Browse files
committed
Merge PR #92, fixing CVE-2018-19762, Thanks to NOKUBI Takatsugu(@knok)
2 parents 048b41d + b5522e1 commit 1af6800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fromsixel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ image_buffer_resize(
290290

291291
size = (size_t)(width * height);
292292
alt_buffer = (unsigned char *)sixel_allocator_malloc(allocator, size);
293-
if (alt_buffer == NULL) {
293+
if (alt_buffer == NULL || size == 0) {
294294
/* free source image */
295295
sixel_allocator_free(allocator, image->data);
296296
image->data = NULL;

0 commit comments

Comments
 (0)