We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8b6c05 commit 8dab9c3Copy full SHA for 8dab9c3
dlib/external/libjpeg/rdtarga.c
@@ -365,7 +365,8 @@ start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
365
width <= 0 || height <= 0 ||
366
source->pixel_size < 1 || source->pixel_size > 4 ||
367
(UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */
368
- interlace_type != 0) /* currently don't allow interlaced image */
+ interlace_type != 0 || /* currently don't allow interlaced image */
369
+ width == 0 || height == 0) /* image width/height must be non-zero */
370
ERREXIT(cinfo, JERR_TGA_BADPARMS);
371
372
if (subtype > 8) {
0 commit comments