Version in base suite: 1.1.1-3 Base version: bcg729_1.1.1-3 Target version: bcg729_1.1.1-3+deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/b/bcg729/bcg729_1.1.1-3.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/b/bcg729/bcg729_1.1.1-3+deb13u1.dsc changelog | 7 +++++ patches/0006-Avoid-possible-division-by-0.patch | 29 ++++++++++++++++++++++++ patches/series | 1 3 files changed, 37 insertions(+) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpefu57nxh/bcg729_1.1.1-3.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpefu57nxh/bcg729_1.1.1-3+deb13u1.dsc: no acceptable signature found diff -Nru bcg729-1.1.1/debian/changelog bcg729-1.1.1/debian/changelog --- bcg729-1.1.1/debian/changelog 2025-02-07 07:42:06.000000000 +0000 +++ bcg729-1.1.1/debian/changelog 2026-07-28 16:26:01.000000000 +0000 @@ -1,3 +1,10 @@ +bcg729 (1.1.1-3+deb13u1) trixie; urgency=medium + + * Fix SIGFPE due to a division by zero in bcg729Encoder(). + Patch taken from upstream. + + -- Guillem Jover Tue, 28 Jul 2026 18:26:01 +0200 + bcg729 (1.1.1-3) unstable; urgency=medium * cmake patches from upstream diff -Nru bcg729-1.1.1/debian/patches/0006-Avoid-possible-division-by-0.patch bcg729-1.1.1/debian/patches/0006-Avoid-possible-division-by-0.patch --- bcg729-1.1.1/debian/patches/0006-Avoid-possible-division-by-0.patch 1970-01-01 00:00:00.000000000 +0000 +++ bcg729-1.1.1/debian/patches/0006-Avoid-possible-division-by-0.patch 2026-07-28 16:23:41.000000000 +0000 @@ -0,0 +1,29 @@ +From 53d06732711b8b03d292a4218c9570ec464cb751 Mon Sep 17 00:00:00 2001 +From: johan pascal +Date: Mon, 6 Jul 2026 22:49:06 +0200 +Subject: [PATCH] Avoid possible division by 0 thanks Richard Fuchs + +--- + src/LP2LSPConversion.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/LP2LSPConversion.c b/src/LP2LSPConversion.c +index 2bbae5d..40d57bc 100644 +--- a/src/LP2LSPConversion.c ++++ b/src/LP2LSPConversion.c +@@ -100,7 +100,11 @@ int LP2LSPConversion(word16_t LPCoefficients[], word16_t LSPCoefficients[]) + + /* linear interpolation for better root accuracy */ + /* xMean = xLow - (xHigh-xLow)* previousCx/(Cx-previousCx); */ +- xMean = (word16_t)SUB32(xLow, MULT16_32_Q15(SUB32(xHigh, xLow), DIV32(SSHL(SATURATE(previousCx, MAXINT17), 14), SHR(SUB32(Cx, previousCx), 1)))); /* Cx are in Q2.15 so we can shift them left 14 bits, the denominator is shifted righ by 1 so the division result is in Q15 */ ++ if (previousCx == Cx) { // avoid possible division by 0: consider previousCx/(Cx-previousCx) to be MAXINT32 or MININT32 depending on previousCx sign ++ xMean = (word16_t)SUB32(xLow, MULT16_32_Q15(SUB32(xHigh, xLow), previousCx>0?MAXINT32:MININT32)); ++ } else { ++ xMean = (word16_t)SUB32(xLow, MULT16_32_Q15(SUB32(xHigh, xLow), SSHL(DIV32(SSHL(SATURATE(previousCx, MAXINT17), 14), SUB32(Cx, previousCx)), 1))); /* Cx are in Q2.15 so we can shift them left 14 bits, the division result is in Q14 so we shift left it one to put it back to Q15 */ ++ } + + /* recompute previousCx with the new coefficients */ + previousCx = ChebyshevPolynomial(xMean, polynomialCoefficients); +-- +2.53.0 + diff -Nru bcg729-1.1.1/debian/patches/series bcg729-1.1.1/debian/patches/series --- bcg729-1.1.1/debian/patches/series 2025-02-07 07:42:06.000000000 +0000 +++ bcg729-1.1.1/debian/patches/series 2026-07-28 16:25:25.000000000 +0000 @@ -3,3 +3,4 @@ 0003-No-longer-use-CMAKE_BUILD_TYPE-to-allow-configuratio.patch 0004-cmake-files-installed-under-usr-lib-arch-triplet.patch 0005-Prevent-RPM-.spec-file-generation-which-breaks-repea.patch +0006-Avoid-possible-division-by-0.patch