[FFmpeg-cvslog] lavf/mpjpegdec: Fixed dereference after null check
Alex Agranovsky
git at videolan.org
Wed Dec 9 20:06:25 CET 2015
ffmpeg | branch: master | Alex Agranovsky <alex at sighthound.com> | Wed Dec 9 12:48:20 2015 -0500| [7fd1c85e51958050180b37a1bf4ce833d44f91e8] | committer: Michael Niedermayer
lavf/mpjpegdec: Fixed dereference after null check
Fixes Coverity CID 1341576
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7fd1c85e51958050180b37a1bf4ce833d44f91e8
---
libavformat/mpjpegdec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index 3429d19..dd31f87 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++;
More information about the ffmpeg-cvslog
mailing list