diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2015-06-10 14:41:14 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2015-06-12 08:39:05 +0800 |
commit | 8455834161bab3374fe9756fd4a28d919027daf7 (patch) | |
tree | 668f55b5dbd282f07570c65d871480d98ca3f66e | |
parent | 826da62a2fca8b989623102a400b38ba47cd6dfe (diff) | |
download | libva-8455834161bab3374fe9756fd4a28d919027daf7.tar.gz |
test/decode/tinyjpeg: make sure the pointer is valid before dereferencing it
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
-rw-r--r-- | test/decode/tinyjpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/decode/tinyjpeg.c b/test/decode/tinyjpeg.c index 10ff99b..e4747b4 100644 --- a/test/decode/tinyjpeg.c +++ b/test/decode/tinyjpeg.c @@ -388,7 +388,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; |