Commit 6639b257 authored by James Zern's avatar James Zern Committed by Gerrit Code Review
Browse files

Merge "Fixed the buffer overflow issue"

parents 27bce6c5 936aa281
...@@ -1148,7 +1148,7 @@ void vp9_alloc_compressor_data(VP9_COMP *cpi) { ...@@ -1148,7 +1148,7 @@ void vp9_alloc_compressor_data(VP9_COMP *cpi) {
vpx_free(cpi->tok); vpx_free(cpi->tok);
{ {
unsigned int tokens = cm->mb_rows * cm->mb_cols * 24 * 16; unsigned int tokens = cm->mb_rows * cm->mb_cols * (24 * 16 + 1);
CHECK_MEM_ERROR(cpi->tok, vpx_calloc(tokens, sizeof(*cpi->tok))); CHECK_MEM_ERROR(cpi->tok, vpx_calloc(tokens, sizeof(*cpi->tok)));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment