diff mbox

[FFmpeg-devel,V3,1/2] avformat/dashdec: fix pointer being freed was not allocated

Message ID 20190916104428.23631-1-hello.vectronic@gmail.com
State Accepted
Commit 598962cd3a68e30662cfbd5e053eef85d2ee3a8a
Headers show

Commit Message

vectronic Sept. 16, 2019, 10:44 a.m. UTC
prevent attempt to call xmlFree if val was not allocated

fixes: 8135
Signed-off-by: vectronic <hello.vectronic@gmail.com>
---
 libavformat/dashdec.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Liu Steven Sept. 16, 2019, 10:55 a.m. UTC | #1
> 在 2019年9月16日,下午6:44,vectronic <hello.vectronic@gmail.com> 写道:
> 
> prevent attempt to call xmlFree if val was not allocated
> 
> fixes: 8135
> Signed-off-by: vectronic <hello.vectronic@gmail.com>
> ---
> libavformat/dashdec.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
> index 8c0a9b0102..738bfeaefb 100644
> --- a/libavformat/dashdec.c
> +++ b/libavformat/dashdec.c
> @@ -1203,6 +1203,7 @@ static int parse_programinformation(AVFormatContext *s, xmlNodePtr node)
>         }
>         node = xmlNextElementSibling(node);
>         xmlFree(val);
> +        val = NULL;
>     }
>     return 0;
> }
> -- 
> 2.20.1 (Apple Git-117)
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

patchset LGTM

Thanks
Steven
vectronic Sept. 20, 2019, 12:20 p.m. UTC | #2
> On 16 Sep 2019, at 11:55, Liu Steven <lq@chinaffmpeg.org> wrote:
> 
> 
> 
>> 在 2019年9月16日,下午6:44,vectronic <hello.vectronic@gmail.com> 写道:
>> 
>> prevent attempt to call xmlFree if val was not allocated
>> 
>> fixes: 8135
>> Signed-off-by: vectronic <hello.vectronic@gmail.com>
>> ---
>> libavformat/dashdec.c | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>> index 8c0a9b0102..738bfeaefb 100644
>> --- a/libavformat/dashdec.c
>> +++ b/libavformat/dashdec.c
>> @@ -1203,6 +1203,7 @@ static int parse_programinformation(AVFormatContext *s, xmlNodePtr node)
>>        }
>>        node = xmlNextElementSibling(node);
>>        xmlFree(val);
>> +        val = NULL;
>>    }
>>    return 0;
>> }
>> -- 
>> 2.20.1 (Apple Git-117)
>> 
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> 
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> 
> patchset LGTM
> 
> Thanks
> Steven
> 

Anything else you need or will this be applied at some point?

Thanks
Nick
Liu Steven Sept. 23, 2019, 3:07 a.m. UTC | #3
> 在 2019年9月20日,下午8:20,vectronic <hello.vectronic@gmail.com> 写道:
> 
> 
> 
>> On 16 Sep 2019, at 11:55, Liu Steven <lq@chinaffmpeg.org> wrote:
>> 
>> 
>> 
>>> 在 2019年9月16日,下午6:44,vectronic <hello.vectronic@gmail.com> 写道:
>>> 
>>> prevent attempt to call xmlFree if val was not allocated
>>> 
>>> fixes: 8135
>>> Signed-off-by: vectronic <hello.vectronic@gmail.com>
>>> ---
>>> libavformat/dashdec.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>> 
>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>> index 8c0a9b0102..738bfeaefb 100644
>>> --- a/libavformat/dashdec.c
>>> +++ b/libavformat/dashdec.c
>>> @@ -1203,6 +1203,7 @@ static int parse_programinformation(AVFormatContext *s, xmlNodePtr node)
>>>       }
>>>       node = xmlNextElementSibling(node);
>>>       xmlFree(val);
>>> +        val = NULL;
>>>   }
>>>   return 0;
>>> }
>>> -- 
>>> 2.20.1 (Apple Git-117)
>>> 
>>> _______________________________________________
>>> ffmpeg-devel mailing list
>>> ffmpeg-devel@ffmpeg.org
>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>> 
>>> To unsubscribe, visit link above, or email
>>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>> 
>> patchset LGTM
>> 

Applied


Thanks
Steven
diff mbox

Patch

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 8c0a9b0102..738bfeaefb 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1203,6 +1203,7 @@  static int parse_programinformation(AVFormatContext *s, xmlNodePtr node)
         }
         node = xmlNextElementSibling(node);
         xmlFree(val);
+        val = NULL;
     }
     return 0;
 }