mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
ipv4: Use predefined value for readability
Signed-off-by: Hisao Tanabe <xtanabe@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
266a164684
commit
5a2b646ffe
@ -364,7 +364,7 @@ int ip_options_compile(struct net *net,
|
||||
}
|
||||
if (optptr[2] <= optlen) {
|
||||
unsigned char *timeptr = NULL;
|
||||
if (optptr[2]+3 > optptr[1]) {
|
||||
if (optptr[2]+3 > optlen) {
|
||||
pp_ptr = optptr + 2;
|
||||
goto error;
|
||||
}
|
||||
@ -376,7 +376,7 @@ int ip_options_compile(struct net *net,
|
||||
optptr[2] += 4;
|
||||
break;
|
||||
case IPOPT_TS_TSANDADDR:
|
||||
if (optptr[2]+7 > optptr[1]) {
|
||||
if (optptr[2]+7 > optlen) {
|
||||
pp_ptr = optptr + 2;
|
||||
goto error;
|
||||
}
|
||||
@ -390,7 +390,7 @@ int ip_options_compile(struct net *net,
|
||||
optptr[2] += 8;
|
||||
break;
|
||||
case IPOPT_TS_PRESPEC:
|
||||
if (optptr[2]+7 > optptr[1]) {
|
||||
if (optptr[2]+7 > optlen) {
|
||||
pp_ptr = optptr + 2;
|
||||
goto error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user