Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233882
b: refs/heads/master
c: ce3c869
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Kaiser authored and David S. Miller committed Mar 7, 2011
1 parent 94deba7 commit e2e506d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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: b3ca9b02b00704053a38bfe4c31dbbb9c13595d0
refs/heads/master: ce3c869283739379134e1a90c37dd1a30b5f31b7
3 changes: 2 additions & 1 deletion trunk/drivers/net/macvtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,9 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q,
vnet_hdr_len = q->vnet_hdr_sz;

err = -EINVAL;
if ((len -= vnet_hdr_len) < 0)
if (len < vnet_hdr_len)
goto err;
len -= vnet_hdr_len;

err = memcpy_fromiovecend((void *)&vnet_hdr, iv, 0,
sizeof(vnet_hdr));
Expand Down

0 comments on commit e2e506d

Please sign in to comment.