You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/indeo3: Fix UB pointer arithmetic
Fixes the following error when running with Clang-UBSan: src/libavcodec/indeo3.c:556:26: runtime error: applying non-zero offset 2560 to null pointer This fixes the indeo3-2 FATE test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -691,9 +691,11 @@ static int decode_cell(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
|
||||
}
|
||||
|
||||
zoom_fac = mode == 10;
|
||||
error = decode_cell_data(ctx, cell, block, ref_block, plane->pitch,
|
||||
zoom_fac, 1, mode, delta, swap_quads,
|
||||
&data_ptr, last_ptr);
|
||||
av_assert2(!ref_block);
|
||||
error = decode_cell_data(ctx, cell, block,
|
||||
block /* dummy to avoid UB pointer arithmetic */,
|
||||
plane->pitch, zoom_fac, 1, mode, delta,
|
||||
swap_quads, &data_ptr, last_ptr);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user