summaryrefslogtreecommitdiff
path: root/libavformat/mpjpegdec.c
diff options
context:
space:
mode:
authorAlex Agranovsky <alex@sighthound.com>2015-12-09 12:48:20 -0500
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-09 19:55:25 +0100
commit7fd1c85e51958050180b37a1bf4ce833d44f91e8 (patch)
treee84cdf9db08e27275e42b8c010846bff6ce24583 /libavformat/mpjpegdec.c
parent80ceb4696ab7b9c40a0e456a866c473a5291d2f2 (diff)
lavf/mpjpegdec: Fixed dereference after null check
Fixes Coverity CID 1341576 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mpjpegdec.c')
-rw-r--r--libavformat/mpjpegdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index 3429d1907a..dd31f87d69 100644
--- a/libavformat/mpjpegdec.c
+++ b/libavformat/mpjpegdec.c
@@ -260,8 +260,10 @@ static char* mpjpeg_get_boundary(AVIOContext* pb)
start = mime_type;
while (start != NULL && *start != '\0') {
start = strchr(start, ';');
- if (start)
- start = start+1;
+ if (!start)
+ break;
+
+ start = start+1;
while (av_isspace(*start))
start++;