Set saner limits, since tinyjpeg will actually decode the whole image
authorH. Peter Anvin <hpa@zytor.com>
Tue, 5 Sep 2006 23:26:08 +0000 (16:26 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 5 Sep 2006 23:26:08 +0000 (16:26 -0700)
com32/lib/sys/vesa/background.c

index 4e7f174..026cbc7 100644 (file)
@@ -181,7 +181,7 @@ static int read_jpeg_file(FILE *fp, uint8_t *header, int len)
     goto err;
 
   tinyjpeg_get_size(jdec, &width, &height);
-  if (width > 65536 || height > 65536)
+  if (width > 4096 || height > 4096)
     goto err;
 
   tinyjpeg_decode(jdec, TINYJPEG_FMT_BGRA32);