From 5a13d47b972ec9be4d324d4ad84c20a1cf046ade Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Fri, 2 Sep 2011 08:02:08 +0300 Subject: 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. --- libmpdemux/demux_mf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmpdemux/demux_mf.c b/libmpdemux/demux_mf.c index 6a463deb5e..f47a11eed6 100644 --- a/libmpdemux/demux_mf.c +++ b/libmpdemux/demux_mf.c @@ -23,6 +23,7 @@ #include #include +#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); } -- cgit v1.2.3