]> git.sesse.net Git - vlc/blobdiff - src/audio_output/aout_internal.h
Check asprintf return value.
[vlc] / src / audio_output / aout_internal.h
index 0af54edbaf6eed5b9ee748368813f6357d95eac5..b0b8449f0f9a0339ba80277f9e96c279d728e050 100644 (file)
@@ -186,7 +186,10 @@ static inline bool AoutChangeFilterString( vlc_object_t *p_obj, aout_instance_t
     {
         char *psz_old = val.psz_string;
         if( *psz_old )
-            asprintf( &val.psz_string, "%s:%s", psz_old, psz_name );
+        {
+            if( asprintf( &val.psz_string, "%s:%s", psz_old, psz_name ) == -1 )
+                val.psz_string = NULL;
+        }
         else
             val.psz_string = strdup( psz_name );
         free( psz_old );