Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1265
b: refs/heads/master
c: 31c2685
h: refs/heads/master
i:
  1263: f65503c
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed May 19, 2005
1 parent 74e1b70 commit 6f7f834
Show file tree
Hide file tree
Showing 2 changed files with 9 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: b9e9dead05b19e7f52c9aa00cd3a5b7ac4fcacf4
refs/heads/master: 31c26852cb2ac77f1d4acb37bcf31f165fd5eb68
9 changes: 8 additions & 1 deletion trunk/net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,21 @@ static int verify_one_alg(struct rtattr **xfrma, enum xfrm_attr_type_t type)
{
struct rtattr *rt = xfrma[type - 1];
struct xfrm_algo *algp;
int len;

if (!rt)
return 0;

if ((rt->rta_len - sizeof(*rt)) < sizeof(*algp))
len = (rt->rta_len - sizeof(*rt)) - sizeof(*algp);
if (len < 0)
return -EINVAL;

algp = RTA_DATA(rt);

len -= (algp->alg_key_len + 7U) / 8;
if (len < 0)
return -EINVAL;

switch (type) {
case XFRMA_ALG_AUTH:
if (!algp->alg_key_len &&
Expand Down

0 comments on commit 6f7f834

Please sign in to comment.