From 182b5b894ef1fd18719899ae5b3fa811a2ddf8fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Wed, 20 Aug 2008 00:07:21 +0200 Subject: [PATCH] Check asprintf return value. --- modules/access_filter/timeshift.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/access_filter/timeshift.c b/modules/access_filter/timeshift.c index ef977bc0d6..924744a5af 100644 --- a/modules/access_filter/timeshift.c +++ b/modules/access_filter/timeshift.c @@ -596,8 +596,9 @@ static char *GetTmpFilePath( access_t *p_access ) #endif } - asprintf( &psz_filename_base, "%s/vlc-timeshift-%d-%d-", - psz_dir, getpid(), p_access->i_object_id ); + if( asprintf( &psz_filename_base, "%s/vlc-timeshift-%d-%d-", + psz_dir, getpid(), p_access->i_object_id ) == -1 ) + psz_filename_base = NULL; free( psz_dir ); return psz_filename_base; -- 2.39.5