[vlc-devel] [PATCH] input: fix use after free
Tristan Matthews
le.businessman at gmail.com
Fri Aug 1 14:34:19 CEST 2014
On Fri, Aug 1, 2014 at 5:42 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 2014-08-01 06:46, Tristan Matthews a écrit :
>
>> ---
>> src/input/input.c | 11 +++++++++--
>> 1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/input/input.c b/src/input/input.c
>> index 87bbfe8..363b1a4 100644
>> --- a/src/input/input.c
>> +++ b/src/input/input.c
>> @@ -2413,17 +2413,24 @@ static int InputSourceInit( input_thread_t
>> *p_input,
>>
>> if( in->p_demux == NULL )
>> {
>> + /* cache info since it may be freed in stream_Delete */
>> + char *err_str;
>> + if( asprintf( &err_str, "no suitable demux module for
>> `%s/%s://%s'",
>> + psz_access, psz_demux, psz_path ) < 0 )
>> + err_str = NULL;
>> +
>
>
> Why add so much code and a new error case when you can just move one line?
I was under the impression that the error message only made sense if
vlc_object_alive returned but true, but you're right.
Best,
Tristan
More information about the vlc-devel
mailing list