diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-12 23:58:48 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-17 15:10:05 +0100 |
commit | 1faafe738d66fc940c7eccc46ba30d000071d264 (patch) | |
tree | 6bfe4d4167d9e1ea9d9895ace9143a837b350427 /LICENSE.md | |
parent | c3d3f0e697f27a14898e74db4fcffa5b35bcaf94 (diff) | |
download | ffmpeg-1faafe738d66fc940c7eccc46ba30d000071d264.tar.gz |
fftools/ffmpeg_opt: Check before accessing union member
OptionDef.u is only an offset (i.e. its off member) iff OPT_FLAG_OFFSET
is true. Otherwise, the pointer arithmetic can be undefined behaviour.
UBSan warns about this (on 32bit arches):
src/fftools/ffmpeg_opt.c:102:15: runtime error: pointer index expression with base 0xffa4db10 overflowed to 0x56059a50
This commit fixes this by checking for OPT_FLAG_OFFSET first.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'LICENSE.md')
0 files changed, 0 insertions, 0 deletions