[vlc-devel] [PATCH] audio_output/common.c: fix potential null-dereference
Filip Roséen
filip at videolabs.io
Wed Jul 20 13:15:05 CEST 2016
---
src/audio_output/common.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/audio_output/common.c b/src/audio_output/common.c
index a6048ad..5e597d7 100644
--- a/src/audio_output/common.c
+++ b/src/audio_output/common.c
@@ -623,6 +623,14 @@ bool aout_ChangeFilterString( vlc_object_t *p_obj, vlc_object_t *p_aout,
i_length += 1 + strlen( ppsz_filter[i] );
char *psz_new = malloc( i_length + 1 );
+
+ if( unlikely( !psz_new ) )
+ {
+ free( ppsz_filter );
+ free( psz_list );
+ return false;
+ }
+
*psz_new = '\0';
for( int i = 0; i < i_count; i++ )
{
--
2.9.0
More information about the vlc-devel
mailing list