diff mbox series

[FFmpeg-devel,1/2] avformat/dashdec: Fix missing NULL check

Message ID DB6PR0901MB1495A311BB4AF571459AA903ECBD0@DB6PR0901MB1495.eurprd09.prod.outlook.com
State Accepted
Headers show
Series [FFmpeg-devel,1/2] avformat/dashdec: Fix missing NULL check | expand

Checks

Context Check Description
andriy/configure warning Failed to apply patch

Commit Message

sfan5 Jan. 25, 2021, 3:24 p.m. UTC
---
  libavformat/dashdec.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steven Liu Jan. 26, 2021, 1:22 a.m. UTC | #1
sfan5 <sfan5@live.de> 于2021年1月25日周一 下午11:25写道:
>
> ---
>   libavformat/dashdec.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
> index 693fc7372b..dc56e89f11 100644
> --- a/libavformat/dashdec.c
> +++ b/libavformat/dashdec.c
> @@ -161,7 +161,7 @@ typedef struct DASHContext {
>   static int ishttp(char *url)
>   {
>       const char *proto_name = avio_find_protocol_name(url);
> -    return av_strstart(proto_name, "http", NULL);
> +    return proto_name && av_strstart(proto_name, "http", NULL);
>   }
>    static int aligned(int val)
> --
> 2.30.0
>
> _______________________________________________
> 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".

LGTM

Thanks
Steven
sfan5 Feb. 3, 2021, 11:03 a.m. UTC | #2
26.01.21 - 02:22 - Steven Liu:
> sfan5 <sfan5@live.de> 于2021年1月25日周一 下午11:25写道:
>> ---
>>    libavformat/dashdec.c | 2 +-
>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>> index 693fc7372b..dc56e89f11 100644
>> --- a/libavformat/dashdec.c
>> +++ b/libavformat/dashdec.c
>> @@ -161,7 +161,7 @@ typedef struct DASHContext {
>>    static int ishttp(char *url)
>>    {
>>        const char *proto_name = avio_find_protocol_name(url);
>> -    return av_strstart(proto_name, "http", NULL);
>> +    return proto_name && av_strstart(proto_name, "http", NULL);
>>    }
>>     static int aligned(int val)
>> --
>> 2.30.0
>>
>> _______________________________________________
>> 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".
> LGTM
>
> Thanks
> Steven

I don't have commit rights myself. Can you push these two patches?


Thanks

sfan5
Liu Steven Feb. 3, 2021, 11:30 a.m. UTC | #3
> 2021年2月3日 下午7:03,sfan5 <sfan5@live.de> 写道:
> 
> 26.01.21 - 02:22 - Steven Liu:
>> sfan5 <sfan5@live.de> 于2021年1月25日周一 下午11:25写道:
>>> ---
>>>   libavformat/dashdec.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>> index 693fc7372b..dc56e89f11 100644
>>> --- a/libavformat/dashdec.c
>>> +++ b/libavformat/dashdec.c
>>> @@ -161,7 +161,7 @@ typedef struct DASHContext {
>>>   static int ishttp(char *url)
>>>   {
>>>       const char *proto_name = avio_find_protocol_name(url);
>>> -    return av_strstart(proto_name, "http", NULL);
>>> +    return proto_name && av_strstart(proto_name, "http", NULL);
>>>   }
>>>    static int aligned(int val)
>>> --
>>> 2.30.0
>>> 
>>> _______________________________________________
>>> 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".
>> LGTM
>> 
>> Thanks
>> Steven
> 
> I don't have commit rights myself. Can you push these two patches?
Of course sure, I will push together  tonight.

> 
> 
> Thanks
> 
> sfan5
> 
> _______________________________________________
> 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".

Thanks

Steven Liu
Liu Steven Feb. 4, 2021, 2:48 a.m. UTC | #4
> 2021年2月3日 下午7:30,Steven Liu <lq@chinaffmpeg.org> 写道:
> 
>> 
>> 2021年2月3日 下午7:03,sfan5 <sfan5@live.de> 写道:
>> 
>> 26.01.21 - 02:22 - Steven Liu:
>>> sfan5 <sfan5@live.de> 于2021年1月25日周一 下午11:25写道:
>>>> ---
>>>>  libavformat/dashdec.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>> 
>>>> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
>>>> index 693fc7372b..dc56e89f11 100644
>>>> --- a/libavformat/dashdec.c
>>>> +++ b/libavformat/dashdec.c
>>>> @@ -161,7 +161,7 @@ typedef struct DASHContext {
>>>>  static int ishttp(char *url)
>>>>  {
>>>>      const char *proto_name = avio_find_protocol_name(url);
>>>> -    return av_strstart(proto_name, "http", NULL);
>>>> +    return proto_name && av_strstart(proto_name, "http", NULL);
>>>>  }
>>>>   static int aligned(int val)
>>>> --
>>>> 2.30.0
>>>> 
>>>> _______________________________________________
>>>> 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".
>>> LGTM
>>> 
>>> Thanks
>>> Steven
>> 
>> I don't have commit rights myself. Can you push these two patches?
> Of course sure, I will push together  tonight.
Patchset applied!

Thanks

Steven Liu
diff mbox series

Patch

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 693fc7372b..dc56e89f11 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -161,7 +161,7 @@  typedef struct DASHContext {
  static int ishttp(char *url)
  {
      const char *proto_name = avio_find_protocol_name(url);
-    return av_strstart(proto_name, "http", NULL);
+    return proto_name && av_strstart(proto_name, "http", NULL);
  }
   static int aligned(int val)
-- 
2.30.0