Module Name: src Committed By: martin Date: Sun May 31 10:47:02 UTC 2020
Modified Files: src/usr.sbin/bta2dpd/bta2dpd [netbsd-8]: bta2dpd.c Log Message: 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@. To generate a diff of this commit: cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c diff -u src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3.2.2 src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3.2.3 --- src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c:1.3.2.2 Tue Jan 16 13:09:59 2018 +++ src/usr.sbin/bta2dpd/bta2dpd/bta2dpd.c Sun May 31 10:47:02 2020 @@ -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 <nathanialsl...@yahoo.com.au> @@ -823,6 +823,7 @@ do_interrupt(int fd, short ev, void *arg 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 @@ do_interrupt(int fd, short ev, void *arg exit(1); } else if (len == -1) { close(fd); -next_file: currentFileInd++; audfile = open(files2open[currentFileInd], O_RDONLY); if (audfile < 0) {