Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/usr.sbin/bta2dpd/bta2dpd Pull up following revision(s) (r...
details: https://anonhg.NetBSD.org/src/rev/20e4fc2ea4cf
branches: netbsd-9
changeset: 1001791:20e4fc2ea4cf
user: martin <martin%NetBSD.org@localhost>
date: Sun May 31 10:45:04 2020 +0000
description:
Pull up following revision(s) (requested by nat in ticket #937):
usr.sbin/bta2dpd/bta2dpd/bta2dpd.c: revision 1.7
Avoid running of the end of the array if a file cannot be opened.
Found by plunky@.
diffstat:
usr.sbin/bta2dpd/bta2dpd/bta2dpd.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r 0d30d26b3478 -r 20e4fc2ea4cf usr.sbin/bta2dpd/bta2dpd/bta2dpd.c
--- a/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Sun May 31 10:41:39 2020 +0000
+++ b/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Sun May 31 10:45:04 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bta2dpd.c,v 1.6 2019/07/27 20:10:29 nakayama Exp $ */
+/* $NetBSD: bta2dpd.c,v 1.6.2.1 2020/05/31 10:45:04 martin Exp $ */
/*-
* Copyright (c) 2015 - 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -844,6 +844,7 @@
len = stream(fd, sc, channel_mode, frequency, bands, blocks,
alloc_method, bitpool, mtu, volume);
+next_file:
if (len == -1 && currentFileInd >= numfiles -1) {
event_del(&interrupt_ev);
close(fd);
@@ -851,7 +852,6 @@
exit(1);
} else if (len == -1) {
close(fd);
-next_file:
currentFileInd++;
audfile = open(files2open[currentFileInd], O_RDONLY);
if (audfile < 0) {
Home |
Main Index |
Thread Index |
Old Index