[FFmpeg-devel] [PATCH] avformat/wavenc: use strtoull for UMID conversion

Gyan Doshi ffmpeg at gyani.pro
Fri Feb 2 12:04:27 EET 2024



On 2024-01-29 10:30 am, Gyan Doshi wrote:
> Existing use of strtoll can lead to ERANGE errors leading to incorrect
> storage of UMID.

Plan to push tomorrow.

Regards,
Gyan

> ---
>   libavformat/wavenc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c
> index 82acb9ef0f..a41f40b449 100644
> --- a/libavformat/wavenc.c
> +++ b/libavformat/wavenc.c
> @@ -129,7 +129,7 @@ static void bwf_write_bext_chunk(AVFormatContext *s)
>   
>           for (i = 0; i < len/16; i++) {
>               memcpy(umidpart_str, tmp_tag->value + 2 + (i*16), 16);
> -            umidpart = strtoll(umidpart_str, NULL, 16);
> +            umidpart = strtoull(umidpart_str, NULL, 16);
>               avio_wb64(s->pb, umidpart);
>           }
>           ffio_fill(s->pb, 0, 64 - i*8);



More information about the ffmpeg-devel mailing list