summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-02-05 20:57:39 +0000
committerderaadt <deraadt@openbsd.org>1997-02-05 20:57:39 +0000
commitc6d9c06b70cc1a826f2300e88f3d1de88f8750eb (patch)
tree808b4b0b3029bd316a207128350aab5ca320c658
parenti like my sentences to end with periods (diff)
downloadwireguard-openbsd-c6d9c06b70cc1a826f2300e88f3d1de88f8750eb.tar.xz
wireguard-openbsd-c6d9c06b70cc1a826f2300e88f3d1de88f8750eb.zip
repair incorrect IP_OPTIONS parsing
-rw-r--r--usr.sbin/sendmail/src/daemon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/sendmail/src/daemon.c b/usr.sbin/sendmail/src/daemon.c
index bd8a9146de2..8f176392048 100644
--- a/usr.sbin/sendmail/src/daemon.c
+++ b/usr.sbin/sendmail/src/daemon.c
@@ -1394,10 +1394,10 @@ postident:
l -= strlen(p);
/* o[1] is option length */
- j = *++o / sizeof(struct in_addr) - 1;
+ j = o[1] / sizeof(struct in_addr) - 1;
/* q skips length and router pointer to data */
- q = o + 2;
+ q = o + 1 + 2;
for ( ; j >= 0; j--)
{
memcpy(&addr, q, sizeof(addr));
@@ -1412,7 +1412,7 @@ postident:
l -= i + 1;
q += sizeof(struct in_addr);
}
- o += *o;
+ o += o[1];
break;
default: