]> granicus.if.org Git - libvpx/commit
Avoid overflow in calc_iframe_target_size
authorJorge E. Moreira <jemoreira@google.com>
Wed, 30 Jun 2021 18:33:51 +0000 (11:33 -0700)
committerJorge E. Moreira <jemoreira@google.com>
Fri, 2 Jul 2021 03:32:22 +0000 (20:32 -0700)
commit5f345a9246b71374cbedeb28b0e0b0101701732a
treeb80bd75e76e3c44fb4f972827c4685b30cb86c77
parent40e7b4a5bec4c2f1f482b3db72cbaad22bac901f
Avoid overflow in calc_iframe_target_size

The changed product was observed to attempt to multiply 1800 by 2500000,
which overflows unsigned 32 bits. Converting to unsigned 64 bits first
and testing whether the final result fits in 32 bits solves the problem.

BUG=b:179686142

Change-Id: I5d27317bf14b0311b739144c451d8e172db01945
vp8/encoder/ratectrl.c