var_buffer_getmemory: invalid memcpy source pointer
authorAlain Degreffe <eczema@ecze.com>
Tue, 16 Jul 2013 06:38:29 +0000 (08:38 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 16 Jul 2013 12:35:50 +0000 (14:35 +0200)
Signed-off-by: Rafaël Carré <funman@videolan.org>
(cherry picked from commit 9a74aaad855d14a2e82d8599624280c12dcce5d5)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/access/mms/buffer.c

index b1e8747..c908e27 100644 (file)
@@ -194,7 +194,7 @@ int var_buffer_getmemory ( var_buffer_t *p_buf, void *p_mem, int64_t i_mem )
     i_copy = __MIN( i_mem, p_buf->i_size - p_buf->i_data );
     if( i_copy > 0 && p_mem != NULL)
     {
-        memcpy( p_mem, p_buf + p_buf->i_data, i_copy );
+        memcpy( p_mem, p_buf->p_data + p_buf->i_data , i_copy );
     }
     if( i_copy < 0 )
     {