Browse Source

avcodec/lagarith: disable lag_decode_zero_run_line() and ask for a sample

The code seems to have never been tested
fixing it should be quite easy but needs a sample/testcase

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9a862dfabf_413_2889_assassin_OL.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
100a54da52
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/lagarith.c

+ 3
- 0
libavcodec/lagarith.c View File

@@ -369,6 +369,9 @@ static int lag_decode_zero_run_line(LagarithContext *l, uint8_t *dst,
uint8_t mask2 = -(esc_count < 3);
uint8_t *end = dst + (width - 2);

avpriv_request_sample(l->avctx, "zero_run_line");
return AVERROR_PATCHWELCOME;

output_zeros:
if (l->zeros_rem) {
count = FFMIN(l->zeros_rem, width - i);


Loading…
Cancel
Save