Avoid out of bound reads. Bug-Id: 1031 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>