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:
@@ -65,6 +65,8 @@ public class TJDecompressor {
|
|||||||
|
|
||||||
public int getSubsamp() throws Exception {
|
public int getSubsamp() throws Exception {
|
||||||
if(jpegSubsamp < 0) throw new Exception("JPEG buffer not initialized");
|
if(jpegSubsamp < 0) throw new Exception("JPEG buffer not initialized");
|
||||||
|
if(jpegSubsamp >= TJ.NUMSAMPOPT)
|
||||||
|
throw new Exception("JPEG header information is invalid");
|
||||||
return jpegSubsamp;
|
return jpegSubsamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user