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 a3ef34c commit 82923ebCopy full SHA for 82923eb
rdtarga.c
@@ -364,7 +364,8 @@ start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
364
if (cmaptype > 1 || /* cmaptype must be 0 or 1 */
365
source->pixel_size < 1 || source->pixel_size > 4 ||
366
(UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */
367
- interlace_type != 0) /* currently don't allow interlaced image */
+ interlace_type != 0 || /* currently don't allow interlaced image */
368
+ width == 0 || height == 0) /* image width/height must be non-zero */
369
ERREXIT(cinfo, JERR_TGA_BADPARMS);
370
371
if (subtype > 8) {
0 commit comments