diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-12-07 15:51:17 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-12-07 15:51:17 -0800 |
commit | bca6d4d9a3012ecfc1fd49ab3f83884ba842c048 (patch) | |
tree | 230232805476942be1ea70f5e4f890d9455b0eec /com32/lib/sys | |
parent | 59c41c2ca42228fa098d9152714059066b19f2b5 (diff) | |
download | syslinux-bca6d4d9a3012ecfc1fd49ab3f83884ba842c048.tar.gz |
vesacon: not all JPEG images are JFIF
There are a fair number of valid JPEG images which we can validly
decode that aren't JFIF-complient, so don't require the JFIF header.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/lib/sys')
-rw-r--r-- | com32/lib/sys/vesa/background.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/com32/lib/sys/vesa/background.c b/com32/lib/sys/vesa/background.c index 60ff1f2b..256c8247 100644 --- a/com32/lib/sys/vesa/background.c +++ b/com32/lib/sys/vesa/background.c @@ -163,8 +163,7 @@ static int jpeg_sig_cmp(uint8_t * bytes, int len) { (void)len; - /* FF D8 = start of image, FF E0 = JFIF header */ - return memcmp(bytes, "\xff\xd8\xff\xe0", 4) ? -1 : 0; + return (bytes[0] == 0xff && bytes[1] == 0xd8) ? 0 : -1; } static int read_jpeg_file(FILE * fp, uint8_t * header, int len) |