1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2014-11-13 13:41:41 +01:00
commit e266e186cf

View File

@ -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);