[FFmpeg-devel] [PATCH] libavformat/asfdec: Fix regression bug when reading image attachments
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sun Aug 8 02:33:12 EEST 2021
Am So., 8. Aug. 2021 um 01:26 Uhr schrieb Soft Works <softworkz at hotmail.com>:
>
> Commit c8140fe7324f264faacf7395b27e12531d1f13f7 had introduced a check for value_len > UINT16_MAX.
> As a consequence, attached images of sizes larger than UINT16_MAX could no longer be read.
>
> Signed-off-by: softworkz <softworkz at hotmail.com>
> ---
> libavformat/asfdec_f.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
> index f784e62996..708331637e 100644
> --- a/libavformat/asfdec_f.c
> +++ b/libavformat/asfdec_f.c
> @@ -707,7 +707,8 @@ static int asf_read_metadata(AVFormatContext *s, int64_t size)
> {
> AVIOContext *pb = s->pb;
> ASFContext *asf = s->priv_data;
> - int n, stream_num, name_len_utf16, name_len_utf8, value_len;
> + int n, stream_num, name_len_utf16, name_len_utf8;
> + unsigned int value_len;
There is something wrong with the indentation afaict.
And why can't you fix the issue leaving the variable an int?
Carl Eugen
More information about the ffmpeg-devel
mailing list