Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23658
b: refs/heads/master
c: f67ed26
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller authored and David S. Miller committed Mar 24, 2006
1 parent 5564bf8 commit 8ce9a66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1a8feed1743ec8d2af1dafa7c5321679f0a3e4f
refs/heads/master: f67ed26f2b3e92c0450deae3ffc3fff21c878a75
5 changes: 3 additions & 2 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,9 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
if (!valbool) {
sk->sk_bound_dev_if = 0;
} else {
if (optlen > IFNAMSIZ)
optlen = IFNAMSIZ;
if (optlen > IFNAMSIZ - 1)
optlen = IFNAMSIZ - 1;
memset(devname, 0, sizeof(devname));
if (copy_from_user(devname, optval, optlen)) {
ret = -EFAULT;
break;
Expand Down

0 comments on commit 8ce9a66

Please sign in to comment.