diff mbox

[FFmpeg-devel,1/2] avcodec/scpr: fix checking ret value of decode_run_i

Message ID 20190523200101.15587-1-cus@passwd.hu
State Accepted
Commit 1b4f74ffe2353270e5c23ebf747104f50ee92eb7
Headers show

Commit Message

Marton Balint May 23, 2019, 8:01 p.m. UTC
Fixes Coverity CID 1441460.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavcodec/scpr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol May 23, 2019, 8:17 p.m. UTC | #1
On 5/23/19, Marton Balint <cus@passwd.hu> wrote:
> Fixes Coverity CID 1441460.
>
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  libavcodec/scpr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
> index 10fc994ecf..317950dafb 100644
> --- a/libavcodec/scpr.c
> +++ b/libavcodec/scpr.c
> @@ -359,7 +359,7 @@ static int decompress_i(AVCodecContext *avctx, uint32_t
> *dst, int linesize)
>          ret = decode_run_i(avctx, ptype, run, &x, &y, clr,
>                             dst, linesize, &lx, &ly,
>                             backstep, off, &cx, &cx1);
> -        if (run < 0)
> +        if (ret < 0)
>              return ret;
>      }
>

OK

> --
> 2.16.4
>
> _______________________________________________
> 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".
Marton Balint May 24, 2019, 8:45 p.m. UTC | #2
On Thu, 23 May 2019, Paul B Mahol wrote:

> On 5/23/19, Marton Balint <cus@passwd.hu> wrote:
>> Fixes Coverity CID 1441460.
>>
>> Signed-off-by: Marton Balint <cus@passwd.hu>
>> ---
>>  libavcodec/scpr.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
>> index 10fc994ecf..317950dafb 100644
>> --- a/libavcodec/scpr.c
>> +++ b/libavcodec/scpr.c
>> @@ -359,7 +359,7 @@ static int decompress_i(AVCodecContext *avctx, uint32_t
>> *dst, int linesize)
>>          ret = decode_run_i(avctx, ptype, run, &x, &y, clr,
>>                             dst, linesize, &lx, &ly,
>>                             backstep, off, &cx, &cx1);
>> -        if (run < 0)
>> +        if (ret < 0)
>>              return ret;
>>      }
>>
>
> OK

Thanks, applied the series.

Regards,
Marton
diff mbox

Patch

diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index 10fc994ecf..317950dafb 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -359,7 +359,7 @@  static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
         ret = decode_run_i(avctx, ptype, run, &x, &y, clr,
                            dst, linesize, &lx, &ly,
                            backstep, off, &cx, &cx1);
-        if (run < 0)
+        if (ret < 0)
             return ret;
     }