Commit 9a74aaad authored by Alain Degreffe's avatar Alain Degreffe Committed by Rafaël Carré

var_buffer_getmemory: invalid memcpy source pointer

Signed-off-by: default avatarRafaël Carré <funman@videolan.org>
parent 4446d452
...@@ -198,7 +198,7 @@ int var_buffer_getmemory ( var_buffer_t *p_buf, void *p_mem, int64_t i_mem ) ...@@ -198,7 +198,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 ); i_copy = __MIN( i_mem, p_buf->i_size - p_buf->i_data );
if( i_copy > 0 && p_mem != NULL) 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 ) if( i_copy < 0 )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment