1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00
freebsd-ports/audio/sox/files/patch-src_oss.c
Tobias Kortkamp 45d567e934 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
2017-11-20 20:34:24 +00:00

18 lines
482 B
C

$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;
}