[vlc-commits] vlc_arrays.h: check malloc return value.
    Jean-Paul Saman 
    git at videolan.org
       
    Wed May  2 15:10:17 CEST 2012
    
    
  
vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Wed May  2 11:05:16 2012 +0200| [0dd0a8d44ccd510889be9239e51975a3dd5071a4] | committer: Jean-Paul Saman
vlc_arrays.h: check malloc return value.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0dd0a8d44ccd510889be9239e51975a3dd5071a4
---
 include/vlc_arrays.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/vlc_arrays.h b/include/vlc_arrays.h
index 6643197..5142158 100644
--- a/include/vlc_arrays.h
+++ b/include/vlc_arrays.h
@@ -507,6 +507,8 @@ vlc_dictionary_all_keys( const vlc_dictionary_t * p_dict )
     int i, count = vlc_dictionary_keys_count( p_dict );
 
     ppsz_ret = (char**)malloc(sizeof(char *) * (count + 1));
+    if( !ppsz_ret )
+        return NULL;
 
     count = 0;
     for( i = 0; i < p_dict->i_size; i++ )
    
    
More information about the vlc-commits
mailing list