rmdec: when using INT4 deinterleaving, error out if sub_packet_h <= 1.
authorRonald S. Bultje <rsbultje@gmail.com>
Tue, 21 Feb 2012 18:36:27 +0000 (10:36 -0800)
committerReinhard Tartler <siretart@tauware.de>
Sun, 26 Feb 2012 09:03:16 +0000 (10:03 +0100)
commit0312969b9ea7fa7027bca665bfded88690c4caa0
treeb7d26394037951fa4342ed8bd5ef7959bace307f
parent62beae313a4f91e8ff4e8dc0b2ec78baaa804b32
rmdec: when using INT4 deinterleaving, error out if sub_packet_h <= 1.

We read sub_packet_h / 2 packets per line of data (during deinterleaving),
which equals zero if sub_packet_h <= 1, thus causing us to not read any
data, leading to an infinite loop.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit e30b3e59a4f3004337cb1623b2aac988ce52b93f)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/rmdec.c