*/
#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 */
/*
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);
#ifndef lint
/* from: static char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93"; */
-static char *rcsid = "$Id: rlogind.c,v 1.17 1997/02/13 22:21:10 deraadt Exp $";
+static char *rcsid = "$Id: rlogind.c,v 1.18 1997/02/13 22:29:10 deraadt Exp $";
#endif /* not lint */
/*
ipproto = IPPROTO_IP;
if (getsockopt(0, ipproto, IP_OPTIONS, (char *)&opts,
&optsize) == 0 && 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)
exit(1);
#ifndef lint
/* from: static char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94"; */
-static char *rcsid = "$Id: rshd.c,v 1.14 1997/02/13 22:21:08 deraadt Exp $";
+static char *rcsid = "$Id: rshd.c,v 1.15 1997/02/13 22:29:07 deraadt Exp $";
#endif /* not lint */
/*
ipproto = IPPROTO_IP;
if (!getsockopt(0, ipproto, 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)
exit(1);