summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-12-07 15:51:17 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-12-07 15:51:17 -0800
commitbca6d4d9a3012ecfc1fd49ab3f83884ba842c048 (patch)
tree230232805476942be1ea70f5e4f890d9455b0eec
parent59c41c2ca42228fa098d9152714059066b19f2b5 (diff)
downloadsyslinux-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>
-rw-r--r--com32/lib/sys/vesa/background.c3
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)