head 1.3; access; symbols pkgsrc-2026Q2:1.2.0.6 pkgsrc-2026Q2-base:1.2 pkgsrc-2026Q1:1.2.0.4 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.2 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.1.0.28 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.26 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.24 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.22 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.20 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.18 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.16 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.14 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.12 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.10 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.8 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.6 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.4 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.2 pkgsrc-2022Q2-base:1.1; locks; strict; comment @ * @; 1.3 date 2026.07.03.10.23.50; author wiz; state dead; branches; next 1.2; commitid uqBhddEUfzdY5cMG; 1.2 date 2025.10.12.04.06.27; author mrg; state Exp; branches; next 1.1; commitid vZtpHGMDjEj6veeG; 1.1 date 2022.04.24.09.39.46; author nia; state Exp; branches; next ; commitid DnVCP0DE5gyi4rBD; desc @@ 1.3 log @sox: remove Replaced by successor fork sox_ng. This version is unmaintained and has lots of CVEs against it. @ text @$NetBSD: patch-src_sox.c,v 1.2 2025/10/12 04:06:27 mrg Exp $ PR pkg/56800 hitting v or V during sox's play command causes a segfault https://sourceforge.net/p/sox/code/ci/4b17639fb7591153dbd3e234eea21b1a2a29fcfa/ from more than 10 years ago changed the sun audio driver for the 14.4 release to not use stdio (among others) while adjust_volume() in sox.c still used fileno under the assumption that stdio was being used in the audio driver. output_muted is not defined on NetBSD. include to get ioctl() prototype. --- src/sox.c.orig 2014-10-05 19:02:30.000000000 -0700 +++ src/sox.c 2025-10-11 20:54:02.019395172 -0700 @@@@ -1311,9 +1311,11 @@@@ static void adjust_volume(int delta) putc('\a', stderr); } #elif defined(HAVE_AUDIOIO_H) +#include static void adjust_volume(int delta) { - int vol1 = 0, vol2 = 0, fd = fileno((FILE*)ofile->ft->fp); + int vol1 = 0, vol2 = 0, fd; + fd = ofile->ft->fp != NULL ? *((int *)ofile->ft->fp) : -1; if (fd >= 0) { audio_info_t audio_info; if (ioctl(fd, AUDIO_GETINFO, &audio_info) >= 0) { @@@@ -1321,7 +1323,9 @@@@ static void adjust_volume(int delta) vol2 = range_limit(vol1 + delta, 0, 100); AUDIO_INITINFO(&audio_info); audio_info.play.gain = (vol2 * AUDIO_MAX_GAIN + 50) / 100; +#if defined(__sun) audio_info.output_muted = 0; +#endif lsx_debug("%04x %04x", vol1, vol2); if (vol1 != vol2 && ioctl(fd, AUDIO_SETINFO, &audio_info) < 0) vol2 = vol1; @ 1.2 log @include and for function prototypes. @ text @d1 1 a1 1 $NetBSD: patch-src_sox.c,v 1.1 2022/04/24 09:39:46 nia Exp $ @ 1.1 log @PR pkg/56800 hitting v or V during sox's play command causes a segfault from Onno van der Linden @ text @d1 1 a1 1 $NetBSD$ d13 7 a19 3 --- src/sox.c.orig 2014-10-06 02:02:30.000000000 +0000 +++ src/sox.c @@@@ -1313,7 +1313,8 @@@@ static void adjust_volume(int delta) d21 1 d30 1 a30 1 @@@@ -1321,7 +1322,9 @@@@ static void adjust_volume(int delta) @