aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/hscale_fast_bilinear.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-06 09:52:30 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-10 08:55:05 +0200
commitc4f35ba8084f254afe1fb05202abfdcfff63b854 (patch)
treed28ed95bee6c89ea9fd428b0392890614157d413 /libswscale/hscale_fast_bilinear.c
parent8bea4a83aac0cb888ca72af9b823d4b68f40696e (diff)
downloadffmpeg-c4f35ba8084f254afe1fb05202abfdcfff63b854.tar.gz
avutil/channel_layout: Account for \0 in sizes
av_channel_name(), av_channel_description() and av_channel_layout_describe() are supposed to return the size of the needed buffer to allow the user to check for truncation; the documentation ("If the returned value is bigger than buf_size, then the string was truncated.") confirms that size does not mean strlen. Yet the AVBPrint API, i.e. AVBPrint.len, does not account for the terminating '\0'. Therefore the returned length is off by one. Furthermore, also check for whether the returned value actually fits in an int (which is the return value of these functions). Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libswscale/hscale_fast_bilinear.c')
0 files changed, 0 insertions, 0 deletions