git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0d40e8b
)
Fix dereference before NULL test (CID 106)
author
Rémi Duraffort
<ivoire@videolan.org>
Tue, 9 Dec 2008 17:46:41 +0000
(18:46 +0100)
committer
Rémi Duraffort
<ivoire@videolan.org>
Tue, 9 Dec 2008 17:46:41 +0000
(18:46 +0100)
modules/mux/mpeg/bits.h
patch
|
blob
|
history
diff --git
a/modules/mux/mpeg/bits.h
b/modules/mux/mpeg/bits.h
index
407d4ca
..
0a14e90
100644
(file)
--- 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;
}