amrwb: error out early if mode is invalid.
authorRonald S. Bultje <rsbultje@gmail.com>
Thu, 1 Mar 2012 21:51:21 +0000 (13:51 -0800)
committerRonald S. Bultje <rsbultje@gmail.com>
Fri, 2 Mar 2012 18:34:50 +0000 (10:34 -0800)
commit154b8bb80029e71d562e8936164266300dd35a0e
tree2e81e65a61ca7250f9728146c7dfb9bc7ee8649c
parent291c9b62855d555ac5385e23219461b6080da7db
amrwb: error out early if mode is invalid.

Prevents using the invalid mode as an index in a static array, which
would generate invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
libavcodec/amrwbdec.c