diff mbox series

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

Message ID 20240129050007.1674-1-ffmpeg@gyani.pro
State Accepted
Commit 7375a6ca7b4a4b223a71f85a772c64a34e60eabe
Headers show
Series [FFmpeg-devel] avformat/wavenc: use strtoull for UMID conversion | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Gyan Doshi Jan. 29, 2024, 5 a.m. UTC
Existing use of strtoll can lead to ERANGE errors leading to incorrect
storage of UMID.
---
 libavformat/wavenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gyan Doshi Feb. 2, 2024, 10:04 a.m. UTC | #1
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);
Gyan Doshi Feb. 4, 2024, 9:17 a.m. UTC | #2
On 2024-02-02 03:34 pm, Gyan Doshi wrote:
>
>
> 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.

Pushed as 7375a6ca7b4a4b223a71f85a772c64a34e60eabe

Regards,
Gyan
diff mbox series

Patch

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);