fix integer promotion bug in partition size check
authorJohn Koleszar <jkoleszar@google.com>
Thu, 4 Nov 2010 20:59:26 +0000 (16:59 -0400)
committerJohn Koleszar <jkoleszar@google.com>
Fri, 5 Nov 2010 18:52:53 +0000 (14:52 -0400)
commit9fb80f7170ec48e23c3c7b477149eeb37081c699
tree4d98b3422eec115983ac2467d24fd449fb080eb4
parent09bcc1f710ea65dc158639479288fb1908ff0c53
fix integer promotion bug in partition size check

The check '(user_data_end - partition < partition_size)' must be
evaluated as a signed comparison, but because partition_size was
unsigned, the LHS was promoted to unsigned, causing an incorrect
result on 32-bit. Instead, check the upper and lower bounds of
the segment separately.

Change-Id: I6266aba7fd7de084268712a3d2a81424ead7aa06
vp8/decoder/decodframe.c
vp8/vp8_dx_iface.c