[FFmpeg-devel] [PATCH] avcodec/elbg: fix integer overflows

Leo Izen leo.izen at gmail.com
Sat May 13 01:07:13 EEST 2023


On 5/12/23 17:46, Paul B Mahol wrote:
> Attached.
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

+        int64_t distance = FFABS(a[i] - b[i]);
+
+        distance *= distance;
+        if (dist >= limit - distance)

Why take the absolute value here?


More information about the ffmpeg-devel mailing list