amrwbdec: fix invalid pointer arithmetic
authorMans Rullgard <mans@mansr.com>
Fri, 26 Oct 2012 21:44:38 +0000 (22:44 +0100)
committerMans Rullgard <mans@mansr.com>
Sat, 27 Oct 2012 16:02:45 +0000 (17:02 +0100)
commit50be207759aa7a69a27de585f7d870ec41eba036
tree1b5eed0da018b463f358cb6a101d6799b9fba31e
parent4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26
amrwbdec: fix invalid pointer arithmetic

Subtracting a (positive) value from the address of an array violates
C99 section 6.5.6:

  If both the pointer operand and the result point to elements of the
  same array object, or one past the last element of the array object,
  the evaluation shall not produce an overflow; otherwise, the
  behavior is undefined.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/amrwbdec.c