[vlc-devel] commit: block_Realloc: fix reallocation check ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Aug 30 15:26:48 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Aug 30 16:23:27 2009 +0300| [a6f9b9026a9bc0ade10a2c2cd0f8f7bc1a02494e] | committer: Rémi Denis-Courmont
block_Realloc: fix reallocation check
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a6f9b9026a9bc0ade10a2c2cd0f8f7bc1a02494e
---
src/misc/block.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/misc/block.c b/src/misc/block.c
index 339c5a5..437afa6 100644
--- a/src/misc/block.c
+++ b/src/misc/block.c
@@ -193,7 +193,7 @@ block_t *block_Realloc( block_t *p_block, ssize_t i_prebody, size_t i_body )
* minimize the payload size for memory copy. */
assert( i_prebody >= 0 );
if( (size_t)(p_block->p_buffer - p_start) < (size_t)i_prebody
- || (size_t)(p_end - p_block->p_buffer) < p_block->i_buffer + i_body )
+ || (size_t)(p_end - p_block->p_buffer) < i_body )
{
/* FIXME: this is really dumb, we should use realloc() */
block_t *p_rea = block_Alloc( requested );
More information about the vlc-devel
mailing list