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)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 7 Jan 2014 08:43:58 +0000 (09:43 +0100)
commitd92c908e235a0632176b1b037860c73bcd2ed97f
treee9f14a3279dd255e9fe5de1b7590381fdd20b4e2
parentcb4a101fbe2729f77d636c264b11789d251bfe84
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>
(cherry picked from commit d1d99e3befea5d411ac3aae72dbdecce94f8b547)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/pcx.c
(cherry picked from commit 7e350b7ddd19af856b55634233d609e29baab646)
libavcodec/pcx.c