avcodec/cabac: Check initial cabac decoder state
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 27 Nov 2015 12:37:50 +0000 (13:37 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 20 Dec 2015 09:59:27 +0000 (10:59 +0100)
commit1f6aea2cc4e379346d0b5b67e9ce775e12b39def
tree337ff7a507ad4d975f6af9bf3fe4994e84750544
parent2da8c533869afc5836d144571fb5e8b824f15e03
avcodec/cabac: Check initial cabac decoder state

Fixes integer overflows
Fixes: 1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2340_591e9810c7b09efe501ad84638c9e9f8.264

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Found-by: xiedingbao (Ticket4727)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8000d484b83aafa752d84fbdbfb352ffe0dc64f8)

Conflicts:

libavcodec/cabac.h

Conflicts:

libavcodec/h264_cabac.c
libavcodec/h264_slice.c
libavcodec/cabac.c
libavcodec/cabac.h
libavcodec/cabac_functions.h
libavcodec/h264_cabac.c
libavcodec/h264_slice.c