[FFmpeg-devel] [PATCH V1 1/2] avutil/common: Fix underflow for ROUNDED_DIV with unsigned integer

Michael Niedermayer michael at niedermayer.cc
Sat Oct 5 17:16:33 EEST 2019


On Thu, Oct 03, 2019 at 09:53:15AM +0800, Jun Zhao wrote:
> From: Mengye Lv <mengyelv at tencent.com>
> 
> When used ROUNDED_DIV(a,b), if a is unsigned integer zero, it's
> will lead to an underflow issue(it called unsigned integer
> wrapping).
> 
> Fixes #8062
> 
> Signed-off-by: Mengye Lv <mengyelv at tencent.com>
> Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
> ---
>  libavutil/common.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20191005/bf042306/attachment.sig>


More information about the ffmpeg-devel mailing list