]> git.sesse.net Git - vlc/commitdiff
* mp4: fix a buffer overflow.
authorLaurent Aimar <fenrir@videolan.org>
Thu, 24 Apr 2003 20:49:54 +0000 (20:49 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 24 Apr 2003 20:49:54 +0000 (20:49 +0000)
modules/demux/mp4/libmp4.c

index 8990f2107f851e5da81f615e2d4b63259df6ccb1..28f005c48aa0a4096a797288d6de883fbe856db5 100644 (file)
@@ -2,7 +2,7 @@
  * libmp4.c : LibMP4 library for mp4 module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: libmp4.c,v 1.21 2003/04/22 08:51:27 fenrir Exp $
+ * $Id: libmp4.c,v 1.22 2003/04/24 20:49:54 fenrir Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -1971,7 +1971,7 @@ int MP4_ReadBox_rdrf( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
     if( i_len > 0 )
     {
         uint32_t i;
-        p_box->data.p_rdrf->psz_ref = malloc( i_len );
+        p_box->data.p_rdrf->psz_ref = malloc( i_len  + 1);
         for( i = 0; i < i_len; i++ )
         {
             MP4_GET1BYTE( p_box->data.p_rdrf->psz_ref[i] );