[SCM] libav/experimental: fix potential buffer over-read
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:09:14 UTC 2013
The following commit has been merged in the experimental branch:
commit 73039e0fb4e5fbd13602c866ec98e097a777f1f5
Author: Aurelien Jacobs <aurel at gnuage.org>
Date: Thu Nov 8 20:53:06 2007 +0000
fix potential buffer over-read
Originally committed as revision 10966 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 34168ba..076cc8f 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -121,7 +121,7 @@ static int mpegps_read_header(AVFormatContext *s,
s->ctx_flags |= AVFMTCTX_NOHEADER;
get_buffer(&s->pb, buffer, sizeof(buffer));
- if ((p=memchr(buffer, 'S', sizeof(buffer))))
+ if ((p=memchr(buffer, 'S', sizeof(buffer)-5)))
if (!memcmp(p, "Sofdec", 6))
m->sofdec = 1;
url_fseek(&s->pb, -(offset_t)sizeof(buffer), SEEK_CUR);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list