summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-13 13:41:41 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-13 13:46:54 +0100
commite266e186cf1293b755dbc816fac333f300f7c95f (patch)
tree783892d7297a8f4286d1d5cd9578e622747cc806 /libavcodec/ffv1enc.c
parent198e55bfa791943fdd477778a8b39180dab52912 (diff)
parent6abe7edabb7d57e82d7ea6312d30cf05d2192c5b (diff)
Merge commit '6abe7edabb7d57e82d7ea6312d30cf05d2192c5b'
* commit '6abe7edabb7d57e82d7ea6312d30cf05d2192c5b': ffv1: fix out-of-bounds read The change should be harmless but theres no out of array access before the change Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index e2d3707710..cf2a13dc6b 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -166,7 +166,7 @@ static void find_best_state(uint8_t best_state[256][256],
best_len[k] = len;
best_state[i][k] = j;
}
- for (m = 0; m < 256; m++)
+ for (m = 1; m < 256; m++)
if (occ[m]) {
newocc[ one_state[ m]] += occ[m] * p;
newocc[256 - one_state[256 - m]] += occ[m] * (1 - p);