Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-03-17 02:00:38 +0300
committerJames Almer <jamrial@gmail.com>2019-03-17 02:17:05 +0300
commit7350c59e7894cb7e487a0add9942d2b1b39f7161 (patch)
tree2a89d5ccd9996ba7bc35994ae8fe2a7ff93f708d
parentf821d9ad7b6c13cb52f226df473af4818cb619ed (diff)
decode: add a frame tile data buffer size check
This check was already done in dav1d_parse_obus(), so it's added as an assert here for extra precaution.
-rw-r--r--src/decode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/decode.c b/src/decode.c
index 63d6f8d..25deffc 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -3196,6 +3196,7 @@ int dav1d_submit_frame(Dav1dContext *const c) {
// FIXME qsort so tiles are in order (for frame threading)
if (f->n_tile_data_alloc < c->n_tile_data) {
freep(&f->tile);
+ assert(c->n_tile_data < INT_MAX / (int)sizeof(*f->tile));
f->tile = malloc(c->n_tile_data * sizeof(*f->tile));
if (!f->tile) goto error;
f->n_tile_data_alloc = c->n_tile_data;