OSDN Git Service
(root)
/
android-x86
/
hardware-intel-common-libva.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fe4f35
)
test/decode/tinyjpeg: make sure the pointer is valid before dereferencing it
author
Xiang, Haihao
<haihao.xiang@intel.com>
Wed, 10 Jun 2015 06:41:14 +0000
(14:41 +0800)
committer
Xiang, Haihao
<haihao.xiang@intel.com>
Fri, 12 Jun 2015 01:27:58 +0000
(09:27 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit
8455834161bab3374fe9756fd4a28d919027daf7
)
test/decode/tinyjpeg.c
patch
|
blob
|
history
diff --git
a/test/decode/tinyjpeg.c
b/test/decode/tinyjpeg.c
index
33dcdc6
..
f53d083
100644
(file)
--- a/
test/decode/tinyjpeg.c
+++ b/
test/decode/tinyjpeg.c
@@
-387,7
+387,7
@@
static int parse_DRI(struct jdec_private *priv, const unsigned char *stream)
static int findEOI(struct jdec_private *priv,const unsigned char *stream)
{
- while (
!(*stream == 0xff && *(stream+1) == 0xd9 )&& stream<=priv->stream_end
) //searching for the end of image marker
+ while (
stream<=priv->stream_end&& !(*stream == 0xff && *(stream+1) == 0xd9 )
) //searching for the end of image marker
{
stream++;
continue;