]> granicus.if.org Git - libvpx/commit
Fixed the buffer overflow issue
authorJingning Han <jingning@google.com>
Wed, 20 Feb 2013 23:32:17 +0000 (15:32 -0800)
committerJames Zern <jzern@google.com>
Fri, 22 Feb 2013 20:30:35 +0000 (12:30 -0800)
commit936aa281b589e312aeaca2e7db0ec9dc87a2f99a
tree1bbea638257ef94f8cfc4095f254c0a9b6cbaf8e
parent0ef72720d0c54be9faa8287652eeab7b4cd5b7fb
Fixed the buffer overflow issue

The issue that potentially broke the encoding process was due to the fact
that the length of token link is calculated from the total number of tokens
coded, while it is possible, in high bit-rate setting, this length is
greater than the buffer length initially assigned to the cpi->tok.

This patch increases the initially allocated buffer length assigned to
cpi->tok from
(mb_rows * mb_cols * 24 * 16) to (mb_rows * mb_cols * (1 + 24 * 16)).

It resolves the buffer overflow problem.

Change-Id: I8661a8d39ea0a3c24303e3f71a170787a1d5b1df
vp9/encoder/vp9_onyx_if.c