Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netsmb Reject negative ioc_setupcnt.
details: https://anonhg.NetBSD.org/src/rev/337f14104ac8
branches: trunk
changeset: 355395:337f14104ac8
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Jul 28 14:40:42 2017 +0000
description:
Reject negative ioc_setupcnt.
diffstat:
sys/netsmb/smb_usr.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 77e42f4cf474 -r 337f14104ac8 sys/netsmb/smb_usr.c
--- a/sys/netsmb/smb_usr.c Fri Jul 28 14:37:27 2017 +0000
+++ b/sys/netsmb/smb_usr.c Fri Jul 28 14:40:42 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smb_usr.c,v 1.18 2017/07/28 14:37:27 riastradh Exp $ */
+/* $NetBSD: smb_usr.c,v 1.19 2017/07/28 14:40:42 riastradh Exp $ */
/*
* Copyright (c) 2000-2001 Boris Popov
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smb_usr.c,v 1.18 2017/07/28 14:37:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_usr.c,v 1.19 2017/07/28 14:40:42 riastradh Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -300,7 +300,7 @@
struct mdchain *mdp;
int error, len;
- if (dp->ioc_setupcnt > 3)
+ if (dp->ioc_setupcnt < 0 || dp->ioc_setupcnt > 3)
return EINVAL;
error = smb_t2_alloc(SSTOCP(ssp), dp->ioc_setup[0], scred, &t2p);
if (error)
Home |
Main Index |
Thread Index |
Old Index