Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb umidi(4): Fix fencepost in error branch.
details: https://anonhg.NetBSD.org/src/rev/e367178f3ec5
branches: trunk
changeset: 368195:e367178f3ec5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Jun 27 18:56:56 2022 +0000
description:
umidi(4): Fix fencepost in error branch.
Reported-by: syzbot+0bbf3d81c15fd1354759%syzkaller.appspotmail.com@localhost
diffstat:
sys/dev/usb/umidi.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r a9fd4b16af0f -r e367178f3ec5 sys/dev/usb/umidi.c
--- a/sys/dev/usb/umidi.c Mon Jun 27 18:48:49 2022 +0000
+++ b/sys/dev/usb/umidi.c Mon Jun 27 18:56:56 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: umidi.c,v 1.87 2022/04/17 13:15:15 riastradh Exp $ */
+/* $NetBSD: umidi.c,v 1.88 2022/06/27 18:56:56 riastradh Exp $ */
/*
* Copyright (c) 2001, 2012, 2014 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.87 2022/04/17 13:15:15 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.88 2022/06/27 18:56:56 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -739,7 +739,7 @@
ep = sc->sc_endpoints;
for (i = sc->sc_out_num_endpoints+sc->sc_in_num_endpoints; i > 0; i--) {
- err = alloc_pipe(ep++);
+ err = alloc_pipe(ep);
if (err != USBD_NORMAL_COMPLETION) {
for (; ep != sc->sc_endpoints; ep--)
free_pipe(ep-1);
@@ -747,6 +747,7 @@
sc->sc_endpoints = sc->sc_out_ep = sc->sc_in_ep = NULL;
break;
}
+ ep++;
}
return err;
}
Home |
Main Index |
Thread Index |
Old Index