aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2017-11-20 20:34:24 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2017-11-20 20:34:24 +0000
commit45d567e9349cd90a12a19efc077375efa6924205 (patch)
treee967ca652161df120c9608640b4f550236941491
parent470f75b0c39b52542b66a5689e483d4752db9d5d (diff)
audio/sox: Fix segfault in the OSS backend
sox currently crashes when it finishes playing a file. PR: 213262 Approved by: Dan Nelson <dnelson@allantgroup.com> (maintainer) Reported by: Alexandros Perdikomatis <alexandrosperdikomatis@gmail.com> Obtained from: Pkgsrc MFH: 2017Q4
Notes
Notes: svn path=/head/; revision=454577
-rw-r--r--audio/sox/Makefile2
-rw-r--r--audio/sox/files/patch-src_oss.c17
2 files changed, 18 insertions, 1 deletions
diff --git a/audio/sox/Makefile b/audio/sox/Makefile
index 22ce8c6fab45..e2cce1d38300 100644
--- a/audio/sox/Makefile
+++ b/audio/sox/Makefile
@@ -3,7 +3,7 @@
PORTNAME= sox
PORTVERSION= 14.4.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= audio
MASTER_SITES= SF
diff --git a/audio/sox/files/patch-src_oss.c b/audio/sox/files/patch-src_oss.c
new file mode 100644
index 000000000000..8538e8689214
--- /dev/null
+++ b/audio/sox/files/patch-src_oss.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_oss.c,v 1.1 2015/05/25 19:06:24 bsiegert Exp $
+
+Fix segfault when playing (PR pkg/49929).
+
+http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=49929
+
+--- src/oss.c.orig 2014-10-06 02:02:30 UTC
++++ src/oss.c
+@@ -369,7 +369,7 @@ static size_t osswrite(
+ size_t cbStride;
+ int cbWritten;
+
+- cStride = cInput;
++ cStride = cInputRemaining;
+ if (cStride > pPriv->cOutput) {
+ cStride = pPriv->cOutput;
+ }