]> granicus.if.org Git - libvpx/commit
better-hw-compatibility: fix out of bounds access
authorMatthias Räncker <theonetruecamper@gmx.de>
Thu, 20 Sep 2018 17:57:25 +0000 (19:57 +0200)
committerMatthias Räncker <theonetruecamper@gmx.de>
Fri, 21 Sep 2018 21:35:42 +0000 (23:35 +0200)
commita439b3c97709604a61fa9ff5d8d02aeae633a69c
treed1064e7f64d4c7176390ecb8211d333c2f5c82bf
parent0aa83d61a18fbdd5921247e0401b0fbba443cf35
better-hw-compatibility: fix out of bounds access

With --enable-better-hw-compatibility an access to array element -1
can be observed for VP9/ActiveMapTest.Test/0
../vp9/encoder/vp9_rdopt.c:3938:53: runtime error:
  index -1 out of bounds for type 'RefBuffer [3]'

There doesn't seem anything that would prevent ref_frame from being 0.
If there is no reference frame it can probably be assumed that it
isn't scaled.

Signed-off-by: Matthias Räncker <theonetruecamper@gmx.de>
Change-Id: I0a29cd0ffc9a19742e5e72203d5ec5d0a16eac7a
vp9/encoder/vp9_rdopt.c