Bug#1129705: trixie-pu: package mpg123/1.32.10-1+deb13u1

2026-03-04 Thread Sebastian Ramacher
On 2026-03-04 21:48:27 +0100, Sebastian Ramacher wrote:
> Package: release.debian.org
> Severity: normal
> Tags: trixie
> X-Debbugs-Cc: [email protected], [email protected]
> Control: affects -1 + src:mpg123
> User: [email protected]
> Usertags: pu
> 
> [ Reason ]
> The uploaded includes a targetted fix of #1129616 backported to stable.
> 
> [ Impact ]
> The bug causes issues with mp3 playback in mpd (see #1129612).
> 
> [ Tests ]
> No automated tests.
> 
> [ Risks ]
> The patches are easy to revert if they cause issues. The changes are in
> unstable since August 2025.
> 
> [ Checklist ]
>   [x] *all* changes are documented in the d/changelog
>   [x] I reviewed all changes and I approve them
>   [x] attach debdiff against the package in stable

Now with the correct debdiff attached.

Cheers
-- 
Sebastian Ramacher
diff --git a/debian/changelog b/debian/changelog
index 5289301..d2ef250 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mpg123 (1.32.10-1+deb13u1) trixie; urgency=medium
+
+  * debian/gbp.conf: Switch to trixie branch
+  * debian/patches: Do not modify raw ID3v2 data while parsing (Closes:
+#1129616)
+
+ -- Sebastian Ramacher   Wed, 04 Mar 2026 21:10:27 +0100
+
 mpg123 (1.32.10-1) unstable; urgency=medium
 
   [ Bastien Roucariès ]
diff --git a/debian/gbp.conf b/debian/gbp.conf
index 4f24002..155e93d 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,3 +1,4 @@
 [DEFAULT]
 pristine-tar = True
 compression = bzip2
+debian-branch = trixie
diff --git 
a/debian/patches/0002-libmpg123-not-modifying-raw-ID3v2-tag-data-anymore-f.patch
 
b/debian/patches/0002-libmpg123-not-modifying-raw-ID3v2-tag-data-anymore-f.patch
new file mode 100644
index 000..bc16b63
--- /dev/null
+++ 
b/debian/patches/0002-libmpg123-not-modifying-raw-ID3v2-tag-data-anymore-f.patch
@@ -0,0 +1,160 @@
+From: thor 
+Date: Thu, 31 Jul 2025 19:37:38 +
+Subject: libmpg123: not modifying raw ID3v2 tag data anymore for
+ store_id3_text() (bug 379)
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+I started with a routine expecting the encoding byte directly followed by the 
text
+data. Then we got data where the encoding is stored at some distance. I faked 
the
+former mode by modifying the input instead of doing the right thing which I 
finally
+did now: Hand in the encoding as separate function argument even if it is just 
the
+leading byte.
+
+Now parsing ID3v2 tags doesn't modify the data you get from 
MPG123_STORE_RAW_ID3.
+For all earlier releases, You need to combine MPG123_STORE_RAW_ID3 with
+MPG123_SKIP_ID3V2 to avoid messing with the data. This was the initial use 
case —
+client code wants the raw data to decode itself, not let libmpg123 do it. We 
just
+forgot that you can do both …
+
+git-svn-id: svn://scm.orgis.org/mpg123/trunk@5518 
35dc7657-300d-0410-a2e5-dc2837fedb53
+---
+ src/libmpg123/id3.c | 41 +++--
+ 1 file changed, 23 insertions(+), 18 deletions(-)
+
+diff --git a/src/libmpg123/id3.c b/src/libmpg123/id3.c
+index 0bd5cda..20eaa9c 100644
+--- a/src/libmpg123/id3.c
 b/src/libmpg123/id3.c
+@@ -330,9 +330,9 @@ void INT123_id3_link(mpg123_handle *fr)
+   Since we can overwrite strings with ID3 update frames, don't free
+   memory, just grow strings.
+ */
+-static void store_id3_text(mpg123_string *sb, unsigned char *source, size_t 
source_size, const int noquiet, const int notranslate)
++static void store_id3_text(mpg123_string *sb, unsigned char encoding, 
unsigned char *source
++, size_t source_size, const int noquiet, const int notranslate)
+ {
+-  unsigned char encoding;
+   if(sb) // Always overwrite, even with nothing.
+   sb->fill = 0;
+   if(!source_size)
+@@ -356,14 +356,13 @@ static void store_id3_text(mpg123_string *sb, unsigned 
char *source, size_t sour
+   return;
+   }
+ 
+-  encoding = source[0];
+   if(encoding > mpg123_id3_enc_max)
+   {
+   if(noquiet)
+   error1("Unknown text encoding %u, I take no chances, 
sorry!", encoding);
+   return;
+   }
+-  INT123_id3_to_utf8(sb, encoding, source+1, source_size-1, noquiet);
++  INT123_id3_to_utf8(sb, encoding, source, source_size, noquiet);
+ 
+   if(sb->fill) debug1("UTF-8 string (the first one): %s", sb->p);
+   else if(noquiet) error("unable to convert string to UTF-8 (out of 
memory, junk input?)!");
+@@ -449,6 +448,11 @@ static void process_text(mpg123_handle *fr, unsigned char 
*realdata, size_t real
+ {
+   /* Text encoding  $xx */
+   /* The text (encoded) ... */
++  if(realsize < 1)
++  {
++  if(NOQUIET) error("Not even an encoding byte?");
++  return;
++  }
+   mpg123_text *t = add_text(fr, id);
+   if(VERBOSE4) fprintf(stderr, "Note: Storing text from %s encoding\n", 
enc_name(realdata[0]));
+   if(t == 

Bug#1129705: trixie-pu: package mpg123/1.32.10-1+deb13u1

2026-03-04 Thread Sebastian Ramacher
Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected], [email protected]
Control: affects -1 + src:mpg123
User: [email protected]
Usertags: pu

[ Reason ]
The uploaded includes a targetted fix of #1129616 backported to stable.

[ Impact ]
The bug causes issues with mp3 playback in mpd (see #1129612).

[ Tests ]
No automated tests.

[ Risks ]
The patches are easy to revert if they cause issues. The changes are in
unstable since August 2025.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in stable
  [x] the issue is verified as fixed in unstable

[ Other info ]
The package is already uploaded.

Cheers
-- 
Sebastian Ramacher
diff --git a/debian/changelog b/debian/changelog
index 5289301..b4d9c47 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mpg123 (1.32.10-1+deb13u1) unstable; urgency=medium
+
+  * debian/gbp.conf: Switch to trixie branch
+  * debian/patches: Do not modify raw ID3v2 data while parsing (Closes:
+#1129616)
+
+ -- Sebastian Ramacher   Wed, 04 Mar 2026 20:59:43 +0100
+
 mpg123 (1.32.10-1) unstable; urgency=medium
 
   [ Bastien Roucariès ]
diff --git a/debian/gbp.conf b/debian/gbp.conf
index 4f24002..155e93d 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,3 +1,4 @@
 [DEFAULT]
 pristine-tar = True
 compression = bzip2
+debian-branch = trixie
diff --git 
a/debian/patches/0002-libmpg123-not-modifying-raw-ID3v2-tag-data-anymore-f.patch
 
b/debian/patches/0002-libmpg123-not-modifying-raw-ID3v2-tag-data-anymore-f.patch
new file mode 100644
index 000..bc16b63
--- /dev/null
+++ 
b/debian/patches/0002-libmpg123-not-modifying-raw-ID3v2-tag-data-anymore-f.patch
@@ -0,0 +1,160 @@
+From: thor 
+Date: Thu, 31 Jul 2025 19:37:38 +
+Subject: libmpg123: not modifying raw ID3v2 tag data anymore for
+ store_id3_text() (bug 379)
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+I started with a routine expecting the encoding byte directly followed by the 
text
+data. Then we got data where the encoding is stored at some distance. I faked 
the
+former mode by modifying the input instead of doing the right thing which I 
finally
+did now: Hand in the encoding as separate function argument even if it is just 
the
+leading byte.
+
+Now parsing ID3v2 tags doesn't modify the data you get from 
MPG123_STORE_RAW_ID3.
+For all earlier releases, You need to combine MPG123_STORE_RAW_ID3 with
+MPG123_SKIP_ID3V2 to avoid messing with the data. This was the initial use 
case —
+client code wants the raw data to decode itself, not let libmpg123 do it. We 
just
+forgot that you can do both …
+
+git-svn-id: svn://scm.orgis.org/mpg123/trunk@5518 
35dc7657-300d-0410-a2e5-dc2837fedb53
+---
+ src/libmpg123/id3.c | 41 +++--
+ 1 file changed, 23 insertions(+), 18 deletions(-)
+
+diff --git a/src/libmpg123/id3.c b/src/libmpg123/id3.c
+index 0bd5cda..20eaa9c 100644
+--- a/src/libmpg123/id3.c
 b/src/libmpg123/id3.c
+@@ -330,9 +330,9 @@ void INT123_id3_link(mpg123_handle *fr)
+   Since we can overwrite strings with ID3 update frames, don't free
+   memory, just grow strings.
+ */
+-static void store_id3_text(mpg123_string *sb, unsigned char *source, size_t 
source_size, const int noquiet, const int notranslate)
++static void store_id3_text(mpg123_string *sb, unsigned char encoding, 
unsigned char *source
++, size_t source_size, const int noquiet, const int notranslate)
+ {
+-  unsigned char encoding;
+   if(sb) // Always overwrite, even with nothing.
+   sb->fill = 0;
+   if(!source_size)
+@@ -356,14 +356,13 @@ static void store_id3_text(mpg123_string *sb, unsigned 
char *source, size_t sour
+   return;
+   }
+ 
+-  encoding = source[0];
+   if(encoding > mpg123_id3_enc_max)
+   {
+   if(noquiet)
+   error1("Unknown text encoding %u, I take no chances, 
sorry!", encoding);
+   return;
+   }
+-  INT123_id3_to_utf8(sb, encoding, source+1, source_size-1, noquiet);
++  INT123_id3_to_utf8(sb, encoding, source, source_size, noquiet);
+ 
+   if(sb->fill) debug1("UTF-8 string (the first one): %s", sb->p);
+   else if(noquiet) error("unable to convert string to UTF-8 (out of 
memory, junk input?)!");
+@@ -449,6 +448,11 @@ static void process_text(mpg123_handle *fr, unsigned char 
*realdata, size_t real
+ {
+   /* Text encoding  $xx */
+   /* The text (encoded) ... */
++  if(realsize < 1)
++  {
++  if(NOQUIET) error("Not even an encoding byte?");
++  return;
++  }
+   mpg123_text *t = add_text(fr, id);
+   if(VERBOSE4) fprintf(stderr, "Note: Storing text from %s encoding\n", 
enc_name(realdata[0]));
+   if(t == NULL)
+@@ -460,7 +464,8 @@ static void process