diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-13 22:29:13 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-13 22:29:13 +0000 |
commit | 5e69317efacc50e5302d6e366dea1e0ff9d34134 (patch) | |
tree | 39c41b80ff37ad0902e7942cd03bbdb60889d285 /lib/libc/rpc | |
parent | f381e85a1c8a8882b7f97043dae54ac839db974b (diff) |
option handling is a bitch
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r-- | lib/libc/rpc/svc_tcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c index eb406395ad7..c755ab1a892 100644 --- a/lib/libc/rpc/svc_tcp.c +++ b/lib/libc/rpc/svc_tcp.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.9 1997/02/13 22:21:11 deraadt Exp $"; +static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.10 1997/02/13 22:29:12 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -254,7 +254,8 @@ rendezvous_request(xprt) if (!getsockopt(sock, IPPROTO_IP, IP_OPTIONS, (char *)&opts, &optsize) && optsize != 0) { - for (i = 0; i < optsize; ) { + for (i = 0; (void *)&opts.ipopt_list[i] - (void *)&opts < + sizeof opts; ) { u_char c = (u_char)opts.ipopt_list[i]; if (c == IPOPT_LSRR || c == IPOPT_SSRR) { close(sock); |