mirror of
https://github.com/mpv-player/mpv
synced 2025-03-23 20:00:56 +00:00
demux_mf: fix option value allocated with strdup
demux_mf allocated the "type" suboption of "--mf" with strdup if it was not explicitly set. This caused a crash after playing an mf:// entry. Fix to use talloc instead.
This commit is contained in:
parent
081e2d0b7b
commit
5a13d47b97
@ -23,6 +23,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "talloc.h"
|
||||
#include "config.h"
|
||||
#include "mp_msg.h"
|
||||
|
||||
@ -123,7 +124,7 @@ static demuxer_t* demux_open_mf(demuxer_t* demuxer){
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, "[demux_mf] file type was not set! (try -mf type=xxx)\n" );
|
||||
free( mf ); return NULL;
|
||||
}
|
||||
mf_type=strdup(p+1);
|
||||
mf_type = talloc_strdup(NULL, p+1);
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO, "[demux_mf] file type was not set! trying 'type=%s'...\n", mf_type);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user