[vlc-devel] [vlc-commits] es_out_timeshift: Add missing vlc_mkdir error check
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Thu Apr 6 17:56:23 CEST 2017
On Thu, Apr 6, 2017, at 05:51 PM, Rémi Denis-Courmont wrote:
> Le torstaina 6. huhtikuuta 2017, 17.49.08 EEST Hugo Beauzée-Luyssen a
> écrit :
> > 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=5950581aa62fa16d0cc
> > > bbf9f80c21cf0b2e16346
> > ---
> >
> > 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;
>
> So if the directory already exists, I cannot save the file. You must have
> thought and tested this through so much...
>
> >
> > int fd = vlc_mkstemp( *filename );
> > if( fd != -1 )
> >
> > _______________________________________________
> > vlc-commits mailing list
> > vlc-commits at videolan.org
> > https://mailman.videolan.org/listinfo/vlc-commits
>
>
> --
> 雷米‧德尼-库尔蒙
> https://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
Fair enough, commit removed.
I'll fix it properly at a later time.
--
Hugo Beauzée-Luyssen
hugo at beauzee.fr
More information about the vlc-devel
mailing list