Skip to content

Commit

Permalink
avcodec/wnv1: clear padding area of rbuf
Browse files Browse the repository at this point in the history
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7faa48586020_2145_MAILTEST.AVI
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Dec 26, 2013
1 parent ec73bd1 commit 14bec7d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libavcodec/wnv1.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static int decode_frame(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "Cannot allocate temporary buffer\n");
return AVERROR(ENOMEM);
}
memset(rbuf + buf_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);

if ((ret = ff_get_buffer(avctx, p, 0)) < 0) {
av_free(rbuf);
Expand Down

0 comments on commit 14bec7d

Please sign in to comment.