projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4325359
)
datapath: Fix argument to strncpy_from_user().
author
Ben Pfaff
<blp@nicira.com>
Tue, 27 Apr 2010 17:21:12 +0000
(10:21 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Tue, 27 Apr 2010 17:21:12 +0000
(10:21 -0700)
The strncpy_from_user() function's 'count' argument is documented to
include the trailing null byte, but create_dp() did not include it. This
commit adds it in.
datapath/datapath.c
patch
|
blob
|
history
diff --git
a/datapath/datapath.c
b/datapath/datapath.c
index e1320f24d12e56784cab08ed784c3eedbeccfc88..be16044d5a44a60ab6a751273187827aedbee8cc 100644
(file)
--- a/
datapath/datapath.c
+++ b/
datapath/datapath.c
@@
-203,7
+203,7
@@
static int create_dp(int dp_idx, const char __user *devnamep)
if (devnamep) {
err = -EFAULT;
- if (strncpy_from_user(devname, devnamep, IFNAMSIZ
- 1
) < 0)
+ if (strncpy_from_user(devname, devnamep, IFNAMSIZ) < 0)
goto err;
devname[IFNAMSIZ - 1] = '\0';
} else {