diff mbox series

[FFmpeg-devel] avcodec/rasc: Fix potential use of uninitialized value

Message ID AM7PR03MB666081948DE616139A0FA8308FAE9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit c9b44a79d1bc87251f36926b288f79adefec397f
Headers show
Series [FFmpeg-devel] avcodec/rasc: Fix potential use of uninitialized value | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 4, 2021, 2:53 p.m. UTC
Fixes Coverity issue #1439566.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/rasc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andreas Rheinhardt Oct. 5, 2021, 5:31 p.m. UTC | #1
Andreas Rheinhardt:
> Fixes Coverity issue #1439566.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/rasc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/rasc.c b/libavcodec/rasc.c
> index 7fedf73878..b328e219bb 100644
> --- a/libavcodec/rasc.c
> +++ b/libavcodec/rasc.c
> @@ -721,6 +721,7 @@ static int decode_frame(AVCodecContext *avctx,
>              break;
>          default:
>              bytestream2_skip(gb, size);
> +            ret = 0;
>          }
>  
>          if (ret < 0)
> 

Will apply later tonight unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/rasc.c b/libavcodec/rasc.c
index 7fedf73878..b328e219bb 100644
--- a/libavcodec/rasc.c
+++ b/libavcodec/rasc.c
@@ -721,6 +721,7 @@  static int decode_frame(AVCodecContext *avctx,
             break;
         default:
             bytestream2_skip(gb, size);
+            ret = 0;
         }
 
         if (ret < 0)