diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-01-15 10:21:36 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-01-18 09:41:32 +0100 |
commit | 0b33310cd02aa8e33b2fc1613d13cadb83bb7da8 (patch) | |
tree | e9e519a2f28dd04a7d69f8927a91193257eeabda /libavutil/opt.h | |
parent | bf23d530d25370819792378d72979a137e6527b9 (diff) | |
download | ffmpeg-0b33310cd02aa8e33b2fc1613d13cadb83bb7da8.tar.gz |
lavc/bitstream: avoid UB in bits_{read,peek}_signed(0)
bits_*_signed(0) will currently invoke an undefined shift by
8 * sizeof(int).
Add bits_*_signed_nz() that only works for n>0, analogous to
bits_read_nz(). Add an explicit check for n=0 in bits_*_signed().
Found-by: James Almer
Diffstat (limited to 'libavutil/opt.h')
0 files changed, 0 insertions, 0 deletions