summaryrefslogtreecommitdiff
path: root/libavcodec/indeo3.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-30 13:52:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-30 13:52:48 +0200
commite5ce6d447b952658b8a8568c807baeab5cf58783 (patch)
tree74af04c23abf7c610e0e944a7df4c7ca87f67a2f /libavcodec/indeo3.c
parent301f6da0397eb8955adf355229521997390d918a (diff)
parentd05f72c75445969cd7bdb1d860635c9880c67fb6 (diff)
Merge commit 'd05f72c75445969cd7bdb1d860635c9880c67fb6'
* commit 'd05f72c75445969cd7bdb1d860635c9880c67fb6': dfa: improve boundary checks in decode_dds1() wmalosslessdec: Fix reading too many bits in decode_channel_residues() wmalosslessdec: fix a get_bits(0) in decode_ac_filter wmalosslessdec: make MCLMS arrays big enough for what is written into them. indeo4/5: check empty tile size in decode_mb_info(). ivi_common: make ff_ivi_process_empty_tile() static. indeo5: check tile size in decode_mb_info(). indeo3: fix out of cell write. Conflicts: libavcodec/dfa.c libavcodec/indeo3.c libavcodec/indeo5.c libavcodec/ivi_common.c libavcodec/wmalosslessdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo3.c')
-rw-r--r--libavcodec/indeo3.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index dd9ab684fe..d19c6044ab 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -427,8 +427,11 @@ static int decode_cell_data(Cell *cell, uint8_t *block, uint8_t *ref_block,
blk_row_offset = (row_offset << (2 + v_zoom)) - (cell->width << 2);
line_offset = v_zoom ? row_offset : 0;
- for (y = 0; y + v_zoom < cell->height; is_first_row = 0, y += 1 + v_zoom) {
- for (x = 0; x + h_zoom < cell->width; x += 1 + h_zoom) {
+ if (cell->height & v_zoom || cell->width & h_zoom)
+ return IV3_BAD_DATA;
+
+ for (y = 0; y < cell->height; is_first_row = 0, y += 1 + v_zoom) {
+ for (x = 0; x < cell->width; x += 1 + h_zoom) {
ref = ref_block;
dst = block;