[vlc-commits] Fix Stack off-by-one overflow in vc1 packetizer

Jean-Baptiste Kempf git at videolan.org
Sat May 12 03:32:11 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat May 12 02:10:58 2012 +0200| [08879e4e4284cd5359578731701195e5d19c2f20] | committer: Jean-Baptiste Kempf

Fix Stack off-by-one overflow in vc1 packetizer

Pointed-By: Clément Lecigne

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=08879e4e4284cd5359578731701195e5d19c2f20
---

 modules/packetizer/vc1.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/packetizer/vc1.c b/modules/packetizer/vc1.c
index e3c7daa..0859f68 100644
--- a/modules/packetizer/vc1.c
+++ b/modules/packetizer/vc1.c
@@ -285,7 +285,7 @@ static void DecodeRIDU( uint8_t *p_ret, int *pi_ret, uint8_t *src, int i_src )
     while( src < end && dst < dst_end )
     {
         if( src < end - 3 && src[0] == 0x00 && src[1] == 0x00 &&
-            src[2] == 0x03 )
+            src[2] == 0x03 && dst < dst_end - 1 )
         {
             *dst++ = 0x00;
             *dst++ = 0x00;



More information about the vlc-commits mailing list