Skip to content
Snippets Groups Projects
Commit 9a3e5c0d authored by Lyndon Brown's avatar Lyndon Brown
Browse files

record: use vlc_MakeTmpFile (thus mkstemp) instead of tempnam

resolves warning about insecure function
parent 5fd5f625
No related branches found
No related tags found
No related merge requests found
......@@ -463,14 +463,16 @@ static void OutputStart( sout_stream_t *p_stream )
for( unsigned i = 0; i < sizeof(ppsz_muxers) / sizeof(*ppsz_muxers); i++ )
{
char *psz_file;
int i_es;
psz_file = tempnam( NULL, "vlc" );
if( !psz_file )
int fd = vlc_MakeTmpFile(&psz_file, PACKAGE_NAME"-rec.XXXXXX", NULL);
if( fd == -1 )
{
msg_Warn( p_stream, "failed to create temporary file" );
continue;
}
msg_Dbg( p_stream, "probing muxer %s", ppsz_muxers[i][0] );
i_es = OutputNew( p_stream, ppsz_muxers[i][0], psz_file, NULL );
int i_es = OutputNew( p_stream, ppsz_muxers[i][0], psz_file, NULL );
vlc_close( fd );
if( i_es < 0 )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment