-
Andreas Rheinhardt authored
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>
1faafe73