projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59c41c2
)
vesacon: not all JPEG images are JFIF
author
H. Peter Anvin
<hpa@zytor.com>
Mon, 7 Dec 2009 23:51:17 +0000
(15:51 -0800)
committer
H. Peter Anvin
<hpa@zytor.com>
Mon, 7 Dec 2009 23:51:17 +0000
(15:51 -0800)
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>
com32/lib/sys/vesa/background.c
patch
|
blob
|
history
diff --git
a/com32/lib/sys/vesa/background.c
b/com32/lib/sys/vesa/background.c
index
60ff1f2
..
256c824
100644
(file)
--- 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)