{vp8,vp9}_set_roi_map: fix validation with INT_MIN
authorJames Zern <jzern@google.com>
Fri, 1 Oct 2021 20:46:02 +0000 (13:46 -0700)
committerJames Zern <jzern@google.com>
Fri, 1 Oct 2021 22:52:38 +0000 (15:52 -0700)
commitfccaa5fa7a3e134949f5ea9fe3d4f3c388d4243b
tree8e1f3efc6fa42aa8630cc8df7462451f674c7079
parentb68877a7ebfe764714f8ce7aeb2a7f6d12b77989
{vp8,vp9}_set_roi_map: fix validation with INT_MIN

previously ranges were checked with abs() whose behavior is undefined
with INT_MIN. this fixes a crash when the original value is returned and
it later used as and offset into a table.

Bug: webm:1742
Change-Id: I345970b75c46699587a4fbc4a059e59277f4c2c8
test/encode_api_test.cc
vp8/encoder/onyx_if.c
vp9/encoder/vp9_encoder.c