summaryrefslogtreecommitdiff
path: root/libavcodec/bitstream.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-01 12:46:36 +0200
committerAnton Khirnov <anton@khirnov.net>2011-06-13 20:42:14 +0200
commit294e5475c2cf4bb7a0db34931515fddc5732c266 (patch)
tree5ca061cf211b3d2a4ff3f90379237f5bbd5d712f /libavcodec/bitstream.c
parent9776e25db9a43e77e9b091c012bf16267d9559d7 (diff)
ffv1: fix undefined behavior with insane widths.
The new tables is large enough to prevent this together with our image size checks. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/bitstream.c')
-rw-r--r--libavcodec/bitstream.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c
index b593db55ce..17b1c69c84 100644
--- a/libavcodec/bitstream.c
+++ b/libavcodec/bitstream.c
@@ -32,11 +32,13 @@
#include "get_bits.h"
#include "put_bits.h"
-const uint8_t ff_log2_run[32]={
+const uint8_t ff_log2_run[41]={
0, 0, 0, 0, 1, 1, 1, 1,
2, 2, 2, 2, 3, 3, 3, 3,
4, 4, 5, 5, 6, 6, 7, 7,
- 8, 9,10,11,12,13,14,15
+ 8, 9,10,11,12,13,14,15,
+16,17,18,19,20,21,22,23,
+24,
};
void align_put_bits(PutBitContext *s)