[vlc-commits] AVI: try again to fix metadata issue: #4765

Jean-Baptiste Kempf git at videolan.org
Sun May 22 21:19:38 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May 22 21:19:09 2011 +0200| [aa446d2ccad256326d2d8ca724df0c3389acf6d7] | committer: Jean-Baptiste Kempf

AVI: try again to fix metadata issue: #4765

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

 modules/demux/avi/libavi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/avi/libavi.c b/modules/demux/avi/libavi.c
index 0bc2540..d5d46ef 100644
--- a/modules/demux/avi/libavi.c
+++ b/modules/demux/avi/libavi.c
@@ -626,13 +626,13 @@ static int AVI_ChunkRead_strz( stream_t *s, avi_chunk_t *p_chk )
         }
     }
     p_strz->p_type = strdup( AVI_strz_type[i_index].psz_type );
-    p_strz->p_str = malloc( i_read + 1);
+    p_strz->p_str = malloc( p_strz->i_chunk_size + 1);
 
     if( p_strz->i_chunk_size )
     {
         memcpy( p_strz->p_str, p_read, p_strz->i_chunk_size );
     }
-    p_strz->p_str[i_read] = 0;
+    p_strz->p_str[p_strz->i_chunk_size] = 0;
 
 #ifdef AVI_DEBUG
     msg_Dbg( (vlc_object_t*)s, "%4.4s: %s : %s",



More information about the vlc-commits mailing list