Module: libav
Branch: master
Commit: 6abe7edabb7d57e82d7ea6312d30cf05d2192c5b

Author:    Vittorio Giovara <[email protected]>
Committer: Vittorio Giovara <[email protected]>
Date:      Tue Nov 11 17:40:04 2014 +0100

ffv1: fix out-of-bounds read

CC: [email protected]
Bug-Id: CID 1047234

---

 libavcodec/ffv1enc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 179453d..93630b4 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -71,7 +71,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);

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to