Check for invalid subsampling factor

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@433 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2011-02-23 20:51:23 +00:00
parent 84a1bcca6f
commit b605cac79e

View File

@@ -65,6 +65,8 @@ public class TJDecompressor {
public int getSubsamp() throws Exception {
if(jpegSubsamp < 0) throw new Exception("JPEG buffer not initialized");
if(jpegSubsamp >= TJ.NUMSAMPOPT)
throw new Exception("JPEG header information is invalid");
return jpegSubsamp;
}