Browse Source

indeo3: Fix null ptr dereference

Fixes Ticket804
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.10
Michael Niedermayer 13 years ago
parent
commit
134aaa79f7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/indeo3.c

+ 2
- 1
libavcodec/indeo3.c View File

@@ -770,7 +770,8 @@ static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
/* get motion vector index and setup the pointer to the mv set */ /* get motion vector index and setup the pointer to the mv set */
if (!ctx->need_resync) if (!ctx->need_resync)
ctx->next_cell_data = &ctx->gb.buffer[(get_bits_count(&ctx->gb) + 7) >> 3]; ctx->next_cell_data = &ctx->gb.buffer[(get_bits_count(&ctx->gb) + 7) >> 3];
curr_cell.mv_ptr = &ctx->mc_vectors[*(ctx->next_cell_data++) << 1];
if(ctx->mc_vectors)
curr_cell.mv_ptr = &ctx->mc_vectors[*(ctx->next_cell_data++) << 1];
curr_cell.tree = 1; /* enter the VQ tree */ curr_cell.tree = 1; /* enter the VQ tree */
UPDATE_BITPOS(8); UPDATE_BITPOS(8);
} else { /* VQ tree DATA code */ } else { /* VQ tree DATA code */


Loading…
Cancel
Save