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

Gyan Doshi git at videolan.org
Sun Feb 4 11:16:02 EET 2024


ffmpeg | branch: master | Gyan Doshi <ffmpeg at gyani.pro> | Mon Jan 29 10:44:06 2024 +0530| [7375a6ca7b4a4b223a71f85a772c64a34e60eabe] | committer: Gyan Doshi

avformat/wavenc: use strtoull for UMID conversion

Existing use of strtoll can lead to ERANGE errors leading to incorrect
storage of UMID.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7375a6ca7b4a4b223a71f85a772c64a34e60eabe
---

 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-cvslog mailing list