shithub: sox

Download patch

ref: 42b3557e13e0fe01a83465b672d89faddbe65f49
parent: 7524160b29a476f7e87bc14fddf12d349f9a3c5e
author: Mans Rullgard <mans@mansr.com>
date: Sun May 9 17:17:32 EDT 2021

mp3: fix error handling in rewrite_tags()

The id3v2_size variable is set to the return value of the
get_id3v2_tag_size() function which can be a negative error
code.  Change the variable type to match that of the function
return value.

--- a/src/mp3.c
+++ b/src/mp3.c
@@ -825,7 +825,7 @@
   priv_t *p = (priv_t *)ft->priv;
 
   off_t file_size;
-  size_t id3v2_size;
+  int id3v2_size;
 
   if (lsx_seeki(ft, (off_t)0, SEEK_END)) {
     lsx_warn("cannot update tags - seek to end failed");