Your message dated Sat, 05 Oct 2024 12:10:54 +0000
with message-id <e1sx3cc-005hcm...@fasolo.debian.org>
and subject line Bug#1029974: fixed in sox 14.4.2+git20190427-5
has caused the Debian Bug report #1029974,
regarding libsox-fmt-base: [PATCH] vorbis: fix memory leaks
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1029974: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029974
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libsox-fmt-base
Version: 14.4.2+git20190427-3+b1
Severity: normal
X-Debbugs-Cc: Asher Gordon <asd...@posteo.net>

Dear Maintainer,

While attempting to write Perl bindings for libsox, I stumbled upon a
memory leak in vorbis.c (two, actually). The memory leak can be seen by
something like the following:

    $ valgrind --leak-check=full --show-leak-kinds=all sox test.ogg test.mp3
    $ valgrind --leak-check=full --show-leak-kinds=all sox test.mp3 test.ogg

The first line shows the read memory leak and the second shows the write
memory leak.

The fix is trivial, and I have attached a patch below (created on the
upstream code base, but applies cleanly on the Debian version):
From a23816e06a6433d1d553668bb8bd784d5f11d37e Mon Sep 17 00:00:00 2001
From: Asher Gordon <asd...@posteo.net>
Date: Sun, 29 Jan 2023 13:08:12 -0500
Subject: [PATCH] vorbis: fix memory leaks

Data was allocated in startread() and startwrite() that was not freed
in stopread() and stopwrite(). Fix it.
---
 src/vorbis.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/vorbis.c b/src/vorbis.c
index 9fa234ce..ab15301a 100644
--- a/src/vorbis.c
+++ b/src/vorbis.c
@@ -229,6 +229,7 @@ static int stopread(sox_format_t * ft)
 
   free(vb->buf);
   ov_clear(vb->vf);
+  free(vb->vf);
 
   return (SOX_SUCCESS);
 }
@@ -404,6 +405,7 @@ static int stopwrite(sox_format_t * ft)
   vorbis_block_clear(&ve->vb);
   vorbis_dsp_clear(&ve->vd);
   vorbis_info_clear(&ve->vi);
+  free(ve);
 
   return (SOX_SUCCESS);
 }
-- 
2.39.0

Thanks,
Asher


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-6-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libsox-fmt-base depends on:
ii  libc6               2.36-8
ii  libflac12           1.4.2+ds-2
ii  libgsm1             1.0.22-1
ii  libogg0             1.3.5-3
ii  libopencore-amrnb0  0.1.6-1
ii  libopencore-amrwb0  0.1.6-1
ii  libsndfile1         1.2.0-1
ii  libsox3             14.4.2+git20190427-3+b1
ii  libvorbis0a         1.3.7-1
ii  libvorbisenc2       1.3.7-1
ii  libvorbisfile3      1.3.7-1
ii  libwavpack1         5.6.0-1

libsox-fmt-base recommends no packages.

libsox-fmt-base suggests no packages.

-- no debconf information

-- 
* Dry-ice can't code his way out of a paper bag
<Coderjoe> dry-ice: int main() { ExitPaperBag(); return 0; }
<Knghtbrd> Is that how that's done then?  *takes notes*
                               --------
I prefer to send and receive mail encrypted. Please send me your
public key, and if you do not have my public key, please let me
know. Thanks.

GPG fingerprint: 38F3 975C D173 4037 B397  8095 D4C9 C4FC 5460 8E68

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: sox
Source-Version: 14.4.2+git20190427-5
Done: Joachim Bauch <fancyc...@debian.org>

We believe that the bug you reported is fixed in the latest version of
sox, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1029...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joachim Bauch <fancyc...@debian.org> (supplier of updated sox package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 04 Oct 2024 21:40:28 +0200
Source: sox
Binary: libsox-dev libsox-fmt-all libsox-fmt-alsa libsox-fmt-alsa-dbgsym 
libsox-fmt-ao libsox-fmt-ao-dbgsym libsox-fmt-base libsox-fmt-base-dbgsym 
libsox-fmt-mp3 libsox-fmt-mp3-dbgsym libsox-fmt-opus libsox-fmt-opus-dbgsym 
libsox-fmt-oss libsox-fmt-oss-dbgsym libsox-fmt-pulse libsox-fmt-pulse-dbgsym 
libsox3 libsox3-dbgsym sox sox-dbgsym
Architecture: source amd64
Version: 14.4.2+git20190427-5
Distribution: unstable
Urgency: medium
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Changed-By: Joachim Bauch <fancyc...@debian.org>
Description:
 libsox-dev - Development files for the SoX library
 libsox-fmt-all - All SoX format libraries
 libsox-fmt-alsa - SoX alsa format I/O library
 libsox-fmt-ao - SoX Libao format I/O library
 libsox-fmt-base - Minimal set of SoX format libraries
 libsox-fmt-mp3 - SoX MP2 and MP3 format library
 libsox-fmt-opus - SoX Opus format library
 libsox-fmt-oss - SoX OSS format I/O library
 libsox-fmt-pulse - SoX PulseAudio format I/O library
 libsox3    - SoX library of audio effects and processing
 sox        - Swiss army knife of sound processing
Closes: 905166 1029974 1075528
Changes:
 sox (14.4.2+git20190427-5) unstable; urgency=medium
 .
   * Team upload
   * Add patch to fix compilation with gcc-14 (Closes: #1075528).
   * Add patch to fix vorbis memory leaks (Closes: #1029974).
   * Enable support for Opus (Closes: #905166).
   * Add "Build-Depends-Package" to symbols file.
Checksums-Sha1:
 ecbe60345d1a537ef735c6a2edd19fcb11c21a6c 2956 sox_14.4.2+git20190427-5.dsc
 01523dc1df36af37f1a4c61333255bd2f1ac46a5 29224 
sox_14.4.2+git20190427-5.debian.tar.xz
 8b9bf9c26e95d7929ac4eb1a7f629febf0d46dc3 361864 
libsox-dev_14.4.2+git20190427-5_amd64.deb
 5e1163fcaed60fec811495967f43b17b466f6872 36612 
libsox-fmt-all_14.4.2+git20190427-5_amd64.deb
 05628f4b63a23034bc699c62eaeed3cc83ae0d96 15308 
libsox-fmt-alsa-dbgsym_14.4.2+git20190427-5_amd64.deb
 f70871053324ecdc25132b0984de16ed3072894a 42012 
libsox-fmt-alsa_14.4.2+git20190427-5_amd64.deb
 35a01c9a3432154134f918a53565b13c21ebd9fd 7416 
libsox-fmt-ao-dbgsym_14.4.2+git20190427-5_amd64.deb
 3f3adce3889e005d2efceb53e25588f7a455d949 38928 
libsox-fmt-ao_14.4.2+git20190427-5_amd64.deb
 d9e2aee19f94b523aae173fab8372d870e464a32 131952 
libsox-fmt-base-dbgsym_14.4.2+git20190427-5_amd64.deb
 b8f86647f593ee5d025bfabcead7b43c62216329 63436 
libsox-fmt-base_14.4.2+git20190427-5_amd64.deb
 da0e4030174802f788d4cdbceddf85898d97ca5d 27476 
libsox-fmt-mp3-dbgsym_14.4.2+git20190427-5_amd64.deb
 07d1c852afa099ce9f0db606e990f6baec4a2725 47444 
libsox-fmt-mp3_14.4.2+git20190427-5_amd64.deb
 0bf567931926e8405ed602493ea84467d4e174fb 8356 
libsox-fmt-opus-dbgsym_14.4.2+git20190427-5_amd64.deb
 50575c4c74c7042df9c667b9f643505c69e0e25e 39372 
libsox-fmt-opus_14.4.2+git20190427-5_amd64.deb
 584ce1bb7084e07fa113661fc653b6acbc4fc09d 9908 
libsox-fmt-oss-dbgsym_14.4.2+git20190427-5_amd64.deb
 e27ab536e3afc2f2b5659b4f2181024b014620af 40460 
libsox-fmt-oss_14.4.2+git20190427-5_amd64.deb
 ecbe7faab015b819ae47931c77e6541879f09c9a 7744 
libsox-fmt-pulse-dbgsym_14.4.2+git20190427-5_amd64.deb
 b5b7a5b4bde762d9e9ab9de0728db50de82a5b05 38888 
libsox-fmt-pulse_14.4.2+git20190427-5_amd64.deb
 d10666c0ae864b330ebe510d856c1aa80245552c 507052 
libsox3-dbgsym_14.4.2+git20190427-5_amd64.deb
 092d1353332083492ad15301b18e28fcc9c751a3 257316 
libsox3_14.4.2+git20190427-5_amd64.deb
 885b8d5d50673c6ef377b437bdb1250f8fe08a6d 58400 
sox-dbgsym_14.4.2+git20190427-5_amd64.deb
 720c30c307e5137520b3b473b952a60543de3534 15397 
sox_14.4.2+git20190427-5_amd64.buildinfo
 2a7a907a588e86008348c81bcf3efaef89f34671 133092 
sox_14.4.2+git20190427-5_amd64.deb
Checksums-Sha256:
 1a62b95ba0681fe06bbae5f3c788b74dfc00264f1d86485987abe597af2ca455 2956 
sox_14.4.2+git20190427-5.dsc
 1ccdb01b98055c48003f2bee9efe0539c39230acd428273c03eeb9048fd60998 29224 
sox_14.4.2+git20190427-5.debian.tar.xz
 6e80ab35aa075fee5a6f03da646434d7dde710324e7d8c86009d21718c95d4bc 361864 
libsox-dev_14.4.2+git20190427-5_amd64.deb
 4dbc09342facc4ae3d8a7ee761c4994ee0109265a5848dcd1ee069eb2386a23d 36612 
libsox-fmt-all_14.4.2+git20190427-5_amd64.deb
 43e16737db7294a736249a8ff6fb2d0b99d5c1f9a79ae80c79c9bdde0a4461ca 15308 
libsox-fmt-alsa-dbgsym_14.4.2+git20190427-5_amd64.deb
 8b8fa46b35d4b34efbfb412912d9b502f3326124a0787ea05af1f09468ff76b1 42012 
libsox-fmt-alsa_14.4.2+git20190427-5_amd64.deb
 bf12377372371a152588f8025a524aa3d46fdabf54c0035272fd18b68758993e 7416 
libsox-fmt-ao-dbgsym_14.4.2+git20190427-5_amd64.deb
 ed355a5b229ac2210181935e1880411fec6e7c574c3020c605b0ee080e837e0a 38928 
libsox-fmt-ao_14.4.2+git20190427-5_amd64.deb
 8808f5ade675efee2d345621224ef4e34d1bd11fe2e322826c46530031714f9f 131952 
libsox-fmt-base-dbgsym_14.4.2+git20190427-5_amd64.deb
 a71d94d5c86183a9534702b88789f4512dd6a0231d776af7c6fc9caf14dad250 63436 
libsox-fmt-base_14.4.2+git20190427-5_amd64.deb
 bf36ccd7e33e0046a5ead6f7b54001ac306763df6d64216582fc6bdfeaef93f6 27476 
libsox-fmt-mp3-dbgsym_14.4.2+git20190427-5_amd64.deb
 b1aed754ea3133645a21d78148ecd8f2ce5b9a564f1cc1a3cb3151105af71d46 47444 
libsox-fmt-mp3_14.4.2+git20190427-5_amd64.deb
 20eabbf696c181e80f08b7ccd1a031c818b0253ddaa0b40e435a6209c0658c07 8356 
libsox-fmt-opus-dbgsym_14.4.2+git20190427-5_amd64.deb
 736527bd097c2f0804af13d894b1c1ea45c407d8a805386efa215bf1b3316986 39372 
libsox-fmt-opus_14.4.2+git20190427-5_amd64.deb
 f8f93dc2bf6b337aab19a8a7ebe4f2d60572d8e0dbc5a72b05056be2b1a88bf4 9908 
libsox-fmt-oss-dbgsym_14.4.2+git20190427-5_amd64.deb
 d2139084210783cd56406777daf8742bc2ecea93bc51bb82076b2685cf013dc9 40460 
libsox-fmt-oss_14.4.2+git20190427-5_amd64.deb
 cbb87f9ca46f2faf76fae91efdd3f593b46d1aca88291fd6a0969d692c0f12c6 7744 
libsox-fmt-pulse-dbgsym_14.4.2+git20190427-5_amd64.deb
 4c2df75e9c1326a4bc6151562ecd5fad1e13ee61c86c0c7e9d5fdd5fc1013c14 38888 
libsox-fmt-pulse_14.4.2+git20190427-5_amd64.deb
 5485fe0e46a8341ee1c71ab574fbee98c0af6792f44866391afee0eb1cc1b6d6 507052 
libsox3-dbgsym_14.4.2+git20190427-5_amd64.deb
 ccf94d4787962e8347db7b06c4ab2f18548dd6c128924b14781cbb4162a24d9f 257316 
libsox3_14.4.2+git20190427-5_amd64.deb
 3b369b3184bd489b4c9aebd5d950aff5ea114ae3ebb4fbbe45e83bef396677e5 58400 
sox-dbgsym_14.4.2+git20190427-5_amd64.deb
 72abf8a1e5fb74332a60aada27ac0902351e2059d33482827f404a247a9c22c7 15397 
sox_14.4.2+git20190427-5_amd64.buildinfo
 28a837a7e02877ee6f1dce9c544a808d87b269be8faa2ab4a40057f411d721c5 133092 
sox_14.4.2+git20190427-5_amd64.deb
Files:
 114f2a5009032b4a5780ce34b4c4f7db 2956 sound optional 
sox_14.4.2+git20190427-5.dsc
 90963518934b2b93e5fce4633291cc12 29224 sound optional 
sox_14.4.2+git20190427-5.debian.tar.xz
 630a77155c596a354bbcb5954361a2cb 361864 libdevel optional 
libsox-dev_14.4.2+git20190427-5_amd64.deb
 3faff06f3c83f2b132ea447f0eb6e0eb 36612 libs optional 
libsox-fmt-all_14.4.2+git20190427-5_amd64.deb
 bc738056d7b747998744966dae7ca649 15308 debug optional 
libsox-fmt-alsa-dbgsym_14.4.2+git20190427-5_amd64.deb
 ac581f857da70b2debe79bcfbc076371 42012 libs optional 
libsox-fmt-alsa_14.4.2+git20190427-5_amd64.deb
 09b7242aa8913cdabd58121642b83b37 7416 debug optional 
libsox-fmt-ao-dbgsym_14.4.2+git20190427-5_amd64.deb
 2128aa55ca353ddfbbdefd8d765bd196 38928 libs optional 
libsox-fmt-ao_14.4.2+git20190427-5_amd64.deb
 65b5c52f863b54276b878e287f7552e9 131952 debug optional 
libsox-fmt-base-dbgsym_14.4.2+git20190427-5_amd64.deb
 ce491479efb40c8cc5c6c7a3a4c8d3f4 63436 libs optional 
libsox-fmt-base_14.4.2+git20190427-5_amd64.deb
 6ac1d9f49772eb20362f9f7725650990 27476 debug optional 
libsox-fmt-mp3-dbgsym_14.4.2+git20190427-5_amd64.deb
 591737914609806ba60cf34644efc4f3 47444 libs optional 
libsox-fmt-mp3_14.4.2+git20190427-5_amd64.deb
 59a0347220336cd39ff7814be8d72d04 8356 debug optional 
libsox-fmt-opus-dbgsym_14.4.2+git20190427-5_amd64.deb
 89c7d4c375ebba653d201eefc60b2c31 39372 libs optional 
libsox-fmt-opus_14.4.2+git20190427-5_amd64.deb
 43985910d8027767596be6fbbead946d 9908 debug optional 
libsox-fmt-oss-dbgsym_14.4.2+git20190427-5_amd64.deb
 cae6dc774f57d18a2b14ccf66b242247 40460 libs optional 
libsox-fmt-oss_14.4.2+git20190427-5_amd64.deb
 f75532637b80d626c75cb1c76c1061a4 7744 debug optional 
libsox-fmt-pulse-dbgsym_14.4.2+git20190427-5_amd64.deb
 a458d99b0fccb1470f4d8042c98f13cc 38888 libs optional 
libsox-fmt-pulse_14.4.2+git20190427-5_amd64.deb
 7f6c86b07353229dbc9a7307865eda8a 507052 debug optional 
libsox3-dbgsym_14.4.2+git20190427-5_amd64.deb
 137c732f37e278d0beb7687c86674186 257316 libs optional 
libsox3_14.4.2+git20190427-5_amd64.deb
 2c562e1ce475bdaabbe0439d6728393f 58400 debug optional 
sox-dbgsym_14.4.2+git20190427-5_amd64.deb
 fd45d0d90f3e33ae660cd84f92ac9291 15397 sound optional 
sox_14.4.2+git20190427-5_amd64.buildinfo
 4e9e187c9bcebf62804c63a99d5c1d49 133092 sound optional 
sox_14.4.2+git20190427-5_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEvj2K8Ga27IB5Zn/Xd8HSLVPhXwIFAmcARxcACgkQd8HSLVPh
XwImzxAAhD0nji3vdcv54fWI70xjBlKKyPom3sbXZyVAlFQx4QTgzAYySUhgNlyx
qT+v1prOuxze+cUbpoH35PEtsvcpCa1JymInRkfcj4ZR9HA0hPN2Z6Ww9zir//l8
S2Lt75GF8PxDTk6Sb0PbG7NOkbwYADfNul8+pSmvBSOV0gRHWcu3CKEzHcs1eem+
kixMevN5KeIYqKTLgLKgXkBrdPF58m8snSp9VlzYe9phFiKyNHCJH1xw/tkvyTSK
Kd2jr9slMIKfeAQD0CHpG7nixnKHFFyy+IbLSOiYo6mqPu2SlCUlc2DL1BBGcBc+
toyXzJUUH05T1ORgXPTHRX6pwOEPkgylDKrwjDaJnpiMD2tS97xywmOXeHqiwNGP
t7M/aizBlIrHnjYnieXs/VrIDnUDeauyalNSsT+AgyUbdV5uorRqODwhTDrgJMQ1
vp2+xnoZ0weQIWt503nmAqU85dPgq0am/1rdbJCPttXsZCixnGvumR3AEI3M4EnQ
30ZjmMETHTyFPXc47VbmaLIEtbNBRZ9HgayhPitlb5quDIyC7DxKKjczK4RpO7Ji
1fPDqt8IvpeHFWzhGI/sybNnlwwsoE++2PzJvdqRvlV6L/HcUwE5jGFXJVFP454f
OXyMMOnePgbMyR+tvPkuMXP+LXAi+T878YygqP5WnvuirOxT7hk=
=xdQw
-----END PGP SIGNATURE-----

Attachment: pgpbt3OZ73RKk.pgp
Description: PGP signature


--- End Message ---

Reply via email to