[vlc-devel] commit: Fix dereference before NULL test (CID 106) ( Rémi Duraffort )
git version control
git at videolan.org
Tue Dec 9 18:51:24 CET 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Dec 9 18:46:41 2008 +0100| [184bba7605c1c286b26b9cdc931752b0a4230252] | committer: Rémi Duraffort
Fix dereference before NULL test (CID 106)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=184bba7605c1c286b26b9cdc931752b0a4230252
---
modules/mux/mpeg/bits.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/mux/mpeg/bits.h b/modules/mux/mpeg/bits.h
index 407d4ca..0a14e90 100644
--- a/modules/mux/mpeg/bits.h
+++ b/modules/mux/mpeg/bits.h
@@ -39,12 +39,12 @@ static inline int bits_initwrite( bits_buffer_t *p_buffer,
p_buffer->i_data = 0;
p_buffer->i_mask = 0x80;
p_buffer->p_data = p_data;
- p_buffer->p_data[0] = 0;
if( !p_buffer->p_data )
{
if( !( p_buffer->p_data = malloc( i_size ) ) )
return -1;
}
+ p_buffer->p_data[0] = 0;
return 0;
}
More information about the vlc-devel
mailing list