[vlc-devel] commit: block_Realloc: handle OOM in case of buffer expansion ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Sep 29 21:46:21 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Sep 29 22:45:47 2009 +0300| [c637769325a20eaffc12d6ce518964572b5c933b] | committer: Rémi Denis-Courmont
block_Realloc: handle OOM in case of buffer expansion
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c637769325a20eaffc12d6ce518964572b5c933b
---
src/misc/block.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/misc/block.c b/src/misc/block.c
index 656a17c..43b3ec4 100644
--- a/src/misc/block.c
+++ b/src/misc/block.c
@@ -224,6 +224,8 @@ block_t *block_Realloc( block_t *p_block, ssize_t i_prebody, size_t i_body )
memcpy( p_rea->p_buffer, p_block->p_buffer, p_block->i_buffer );
}
block_Release( p_block );
+ if( p_rea == NULL )
+ return NULL;
p_block = p_rea;
}
else
More information about the vlc-devel
mailing list