Michael Niedermayer:
> Inspired by: CID1473561 Untrusted pointer write
> 
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
> ---
>  libavcodec/cbs_jpeg.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/cbs_jpeg.c b/libavcodec/cbs_jpeg.c
> index b1b58dcd65e..628841c5f37 100644
> --- a/libavcodec/cbs_jpeg.c
> +++ b/libavcodec/cbs_jpeg.c
> @@ -401,6 +401,7 @@ static int 
> cbs_jpeg_assemble_fragment(CodedBitstreamContext *ctx,
>                  } else {
>                      data[dp++] = unit->data[sp];
>                  }
> +                av_assert0(dp <= size - 2);
>              }
>          }
>      }

You want to add an av_assert0 to a hot loop (or rather: to what would be
a hot loop in case this code were executed) just because Coverity thinks
that reading data with a different endianness taints this data? (That
the supposedly tainted variable has actually already been checked via an
assert makes this even more crazy.)

- Andreas

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to