[SCM] libav/experimental: check that len is not negative

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:46:36 UTC 2013


The following commit has been merged in the experimental branch:
commit a5685be502e510d97c950f1cac8043c7ce1f5ecf
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Wed May 27 00:46:20 2009 +0000

    check that len is not negative
    
    Originally committed as revision 18961 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 3b38359..244b9ed 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -892,6 +892,8 @@ static void mpegts_push_data(MpegTSFilter *filter,
             /* PES packing parsing */
         case MPEGTS_PESHEADER_FILL:
             len = pes->pes_header_size - pes->data_index;
+            if (len < 0)
+                return
             if (len > buf_size)
                 len = buf_size;
             memcpy(pes->header + pes->data_index, p, len);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list