Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/usr.sbin/bta2dpd/bta2dpd Pull up following revision(s) (r...



details:   https://anonhg.NetBSD.org/src/rev/7b654717fe0c
branches:  netbsd-8
changeset: 933919:7b654717fe0c
user:      martin <martin%NetBSD.org@localhost>
date:      Sun May 31 10:47:02 2020 +0000

description:
Pull up following revision(s) (requested by nat in ticket #1553):

        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 f6581d88a828 -r 7b654717fe0c usr.sbin/bta2dpd/bta2dpd/bta2dpd.c
--- a/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c        Sun May 31 10:43:05 2020 +0000
+++ b/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c        Sun May 31 10:47:02 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bta2dpd.c,v 1.3.2.2 2018/01/16 13:09:59 martin Exp $ */
+/* $NetBSD: bta2dpd.c,v 1.3.2.3 2020/05/31 10:47:02 martin Exp $ */
 
 /*-
  * Copyright (c) 2015 - 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -823,6 +823,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);
@@ -830,7 +831,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