jpeg: add jpeg_fetch_size()
This aids the fuzzer test case. Change-Id: Ic7d43b76cf5660e085e7b3b13499de0358c13197 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/12181 Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: build bot (Jenkins)
This commit is contained in:
committed by
Patrick Georgi
parent
a5c5db37ee
commit
246179a808
@ -257,6 +257,18 @@ static int dec_checkmarker(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void jpeg_fetch_size(unsigned char *buf, int *width, int *height)
|
||||
{
|
||||
datap = buf;
|
||||
getbyte();
|
||||
getbyte();
|
||||
readtables(M_SOF0);
|
||||
getword();
|
||||
getbyte();
|
||||
*height = getword();
|
||||
*width = getword();
|
||||
}
|
||||
|
||||
int jpeg_check_size(unsigned char *buf, int width, int height)
|
||||
{
|
||||
datap = buf;
|
||||
|
Reference in New Issue
Block a user