shorten: Use separate pointers for the allocated memory for decoded samples.
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 25 Dec 2011 11:28:50 +0000 (12:28 +0100)
committerReinhard Tartler <siretart@tauware.de>
Sun, 1 Apr 2012 16:33:29 +0000 (18:33 +0200)
commit96ed18cab1048f03ff1c825f46b25d49218f1da4
tree0554729de2c95641c66482fbf0de577a1607ab08
parenta207a2fecc6a77735ab0cf209fdba0b4dd942a86
shorten: Use separate pointers for the allocated memory for decoded samples.

Fixes invalid free() if any of the buffers are not allocated due to either
not decoding a header or an error prior to allocating all buffers.

Fixes CVE-2012-0858
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
(cherry picked from commit 204cb29b3c84a74cbcd059d353c70c8bdc567d98)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 6fc3287b9ccece290c5881b92948772bbf72e68c)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
libavcodec/shorten.c