blob: b5e4b6d513c5099fe53d98758519b2977219271d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
$NetBSD: patch-ae,v 1.3 2008/03/26 02:32:17 tnn Exp $
--- modules/demux/mp4/libmp4.c.orig 2007-11-26 14:08:01.000000000 +0100
+++ modules/demux/mp4/libmp4.c
@@ -1959,10 +1959,14 @@ static int MP4_ReadBox_rdrf( stream_t *p
MP4_GETVERSIONFLAGS( p_box->data.p_rdrf );
MP4_GETFOURCC( p_box->data.p_rdrf->i_ref_type );
MP4_GET4BYTES( i_len );
+ i_len++;
+
if( i_len > 0 )
{
uint32_t i;
- p_box->data.p_rdrf->psz_ref = malloc( i_len + 1);
+ p_box->data.p_rdrf->psz_ref = malloc( i_len );
+ i_len--;
+
for( i = 0; i < i_len; i++ )
{
MP4_GET1BYTE( p_box->data.p_rdrf->psz_ref[i] );
|