mirror of https://gitee.com/openkylin/linux.git
cipso: unsigned buf_len cannot be negative
unsigned buf_len cannot be negative Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Paul Moore <paul.moore@hp.com>
This commit is contained in:
parent
e946217e4f
commit
00af5c6959
|
@ -2063,9 +2063,10 @@ int cipso_v4_skbuff_setattr(struct sk_buff *skb,
|
||||||
u32 opt_len;
|
u32 opt_len;
|
||||||
int len_delta;
|
int len_delta;
|
||||||
|
|
||||||
buf_len = cipso_v4_genopt(buf, buf_len, doi_def, secattr);
|
ret_val = cipso_v4_genopt(buf, buf_len, doi_def, secattr);
|
||||||
if (buf_len < 0)
|
if (ret_val < 0)
|
||||||
return buf_len;
|
return ret_val;
|
||||||
|
buf_len = ret_val;
|
||||||
opt_len = (buf_len + 3) & ~3;
|
opt_len = (buf_len + 3) & ~3;
|
||||||
|
|
||||||
/* we overwrite any existing options to ensure that we have enough
|
/* we overwrite any existing options to ensure that we have enough
|
||||||
|
|
Loading…
Reference in New Issue