[vlc-commits] es_out_timeshift: Add missing vlc_mkdir error check

Hugo Beauzée-Luyssen git at videolan.org
Thu Apr 6 17:49:08 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Apr  6 17:36:20 2017 +0200| [5950581aa62fa16d0ccbbf9f80c21cf0b2e16346] | committer: Hugo Beauzée-Luyssen

es_out_timeshift: Add missing vlc_mkdir error check

CID #1398381

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5950581aa62fa16d0ccbbf9f80c21cf0b2e16346
---

 src/input/es_out_timeshift.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c
index c4d1820..7172fc3 100644
--- a/src/input/es_out_timeshift.c
+++ b/src/input/es_out_timeshift.c
@@ -1651,7 +1651,8 @@ static int GetTmpFile( char **filename, const char *dirname )
      && asprintf( filename, "%s"DIR_SEP PACKAGE_NAME"-timeshift.XXXXXX",
                   dirname ) >= 0 )
     {
-        vlc_mkdir( dirname, 0700 );
+        if( vlc_mkdir( dirname, 0700 ) < 0 )
+            return -1;
 
         int fd = vlc_mkstemp( *filename );
         if( fd != -1 )



More information about the vlc-commits mailing list