* [PATCH net-next] ipv4: Use predefined value for readability
@ 2014-04-27 10:03 Hisao Tanabe
2014-04-28 17:29 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Hisao Tanabe @ 2014-04-27 10:03 UTC (permalink / raw)
To: David S. Miller, netdev; +Cc: Hisao Tanabe
Signed-off-by: Hisao Tanabe <xtanabe@gmail.com>
---
net/ipv4/ip_options.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
index f4ab72e..5e7aece 100644
--- a/net/ipv4/ip_options.c
+++ b/net/ipv4/ip_options.c
@@ -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;
}
--
1.9.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] ipv4: Use predefined value for readability
2014-04-27 10:03 [PATCH net-next] ipv4: Use predefined value for readability Hisao Tanabe
@ 2014-04-28 17:29 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-04-28 17:29 UTC (permalink / raw)
To: xtanabe; +Cc: netdev
From: Hisao Tanabe <xtanabe@gmail.com>
Date: Sun, 27 Apr 2014 19:03:45 +0900
> Signed-off-by: Hisao Tanabe <xtanabe@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-28 19:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-27 10:03 [PATCH net-next] ipv4: Use predefined value for readability Hisao Tanabe
2014-04-28 17:29 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).