diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-04-19 20:10:16 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-04-19 20:10:16 +0000 |
commit | 7d15cc689a1b51f0d595b6fec416d555b5fe0e0d (patch) | |
tree | 1043a903ece48db994dea1dca65f56af01a5f22c /sys/net/pfkeyv2_parsemessage.c | |
parent | f2bf2485fc1ecf76ddbf4b8088a01b54f3b23c56 (diff) |
Include NUL-termination in identity extension length computation
Diffstat (limited to 'sys/net/pfkeyv2_parsemessage.c')
-rw-r--r-- | sys/net/pfkeyv2_parsemessage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/pfkeyv2_parsemessage.c b/sys/net/pfkeyv2_parsemessage.c index 684fe8e1b07..ef6f94a3b60 100644 --- a/sys/net/pfkeyv2_parsemessage.c +++ b/sys/net/pfkeyv2_parsemessage.c @@ -454,7 +454,7 @@ pfkeyv2_parsemessage(void *p, int len, void **headers) if (*(char *)(p + i - 1)) return EINVAL; - j = ((strlen(c) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t)-1)) + + j = ((strlen(c) + sizeof(uint64_t)) & ~(sizeof(uint64_t)-1)) + sizeof(struct sadb_ident); if (i != j) |