[FFmpeg-cvslog] avformat/mpegts: fix iteration count in add_pid_to_pmt()
Michael Niedermayer
git at videolan.org
Tue Nov 4 19:43:33 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Nov 4 19:31:59 2014 +0100| [786594184a1797cc4b573001f3eeb188d5912062] | committer: Michael Niedermayer
avformat/mpegts: fix iteration count in add_pid_to_pmt()
Fixes accessing uninitialized memory
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=786594184a1797cc4b573001f3eeb188d5912062
---
libavformat/mpegts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 97e07a7..78aa13e 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -306,7 +306,7 @@ static void add_pid_to_pmt(MpegTSContext *ts, unsigned int programid,
if (p->nb_pids >= MAX_PIDS_PER_PROGRAM)
return;
- for (i = 0; i < MAX_PIDS_PER_PROGRAM; i++)
+ for (i = 0; i < p->nb_pids; i++)
if (p->pids[i] == pid)
return;
More information about the ffmpeg-cvslog
mailing list