On Sun, 22 Jun 2025 at 15:54, James Almer
<jamrial-at-gmail....@ffmpeg.org> wrote:
>
> Fixes: libavcodec/mss2dsp.c:59:14: runtime error: applying zero offset to 
> null pointer
>
> Signed-off-by: James Almer <jamr...@gmail.com>
> ---
> Untested, as gcc-usan on Linux x86_64 doesn't complain about it, but it can 
> be seen in
> https://fate.ffmpeg.org/report.cgi?time=20250622122557&slot=amd64-clang-cl-msvc-asan
>
>  libavcodec/mss2dsp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/mss2dsp.c b/libavcodec/mss2dsp.c
> index cc39dd637f..ace92ef9c7 100644
> --- a/libavcodec/mss2dsp.c
> +++ b/libavcodec/mss2dsp.c
> @@ -56,7 +56,7 @@ static av_always_inline void 
> mss2_blit_wmv9_template(uint8_t *dst,
>                  }
>              }
>          }
> -        mask +=  mask_stride;
> +        mask  = FF_PTR_ADD(mask, mask_stride);

I can confirm this fixes the mss2-region test. Though I didn't check
the code if similar to other example wouldn't "non-zero offset"
warning come up. At least the test passes. Thanks.

- Kacper
_______________________________________________
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