mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
smacker: add sanity check for length in smacker_decode_tree()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7681d0eaca
commit
b829da3639
@ -96,6 +96,10 @@ enum SmkBlockTypes {
|
||||
*/
|
||||
static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, uint32_t prefix, int length)
|
||||
{
|
||||
if(length > 32) {
|
||||
av_log(NULL, AV_LOG_ERROR, "length too long\n");
|
||||
return -1;
|
||||
}
|
||||
if(!get_bits1(gb)){ //Leaf
|
||||
if(hc->current >= 256){
|
||||
av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n");
|
||||
|
Loading…
Reference in New Issue
Block a user