pcx: Check the packet size before assuming it fits a palette
authorMartin Storsjö <martin@martin.st>
Sun, 29 Sep 2013 10:02:27 +0000 (13:02 +0300)
committerMartin Storsjö <martin@martin.st>
Sun, 29 Sep 2013 17:03:12 +0000 (20:03 +0300)
commitd1d99e3befea5d411ac3aae72dbdecce94f8b547
treecff11c4424c2399156b7e49acbba2a639919b092
parent7ba0cedbfeff5671b264d1d7e90777057b5714c6
pcx: Check the packet size before assuming it fits a palette

This fixes reads out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/pcx.c