summaryrefslogtreecommitdiffstats
path: root/sys/netsmb/smb_dev.h
diff options
context:
space:
mode:
authorcsjp <csjp@FreeBSD.org>2011-01-08 23:06:54 +0000
committercsjp <csjp@FreeBSD.org>2011-01-08 23:06:54 +0000
commit2801f33bdaf165233d1ce6d66f6fb981044439e0 (patch)
treeda82577cb834eded3f6fc598c03b6ff8e0e5a1e5 /sys/netsmb/smb_dev.h
parent3e182d58727c93f8d8e004eaa52b10668766d806 (diff)
downloadFreeBSD-src-2801f33bdaf165233d1ce6d66f6fb981044439e0.zip
FreeBSD-src-2801f33bdaf165233d1ce6d66f6fb981044439e0.tar.gz
Change some variables from int to size_t. This is more accurate since
these variables represent sizes in one capacity or another. There is no reason to allow negative numbers. Change userspace shared structure elements that get used for the modified functions from int to uint32_t, since it's not clear what userspace programs use these fields, and we do not want to break binary compatibility. This fixes a panic when corrupt or bogus data is passed into the kernel. Obtained from: NetBSD MFC after: 3 weeks
Diffstat (limited to 'sys/netsmb/smb_dev.h')
-rw-r--r--sys/netsmb/smb_dev.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netsmb/smb_dev.h b/sys/netsmb/smb_dev.h
index 8eb41f3..67149e1 100644
--- a/sys/netsmb/smb_dev.h
+++ b/sys/netsmb/smb_dev.h
@@ -58,9 +58,9 @@
struct smbioc_ossn {
int ioc_opt;
- int ioc_svlen; /* size of ioc_server address */
+ uint32_t ioc_svlen; /* size of ioc_server address */
struct sockaddr*ioc_server;
- int ioc_lolen; /* size of ioc_local address */
+ uint32_t ioc_lolen; /* size of ioc_local address */
struct sockaddr*ioc_local;
char ioc_srvname[SMB_MAXSRVNAMELEN + 1];
int ioc_timeout;
OpenPOWER on IntegriCloud