diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-07-03 05:16:10 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-07-03 05:16:10 +0000 |
commit | 68ef177922b4b0bd42bd95c5d03489f8b898a460 (patch) | |
tree | c888c938b2df5d42572bb5aee205254778ecadc7 /sys/net/pfkeyv2_parsemessage.c | |
parent | 85f7e485610d4e93178637679e3054e5ad33db92 (diff) |
Use PADUP() instead of hand-crafted weirdness; also, it's supposed to
be "strlen(c) + 1", not just "strlen(c)".
Diffstat (limited to 'sys/net/pfkeyv2_parsemessage.c')
-rw-r--r-- | sys/net/pfkeyv2_parsemessage.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/pfkeyv2_parsemessage.c b/sys/net/pfkeyv2_parsemessage.c index 07de82dac15..8e8a4d57a07 100644 --- a/sys/net/pfkeyv2_parsemessage.c +++ b/sys/net/pfkeyv2_parsemessage.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2_parsemessage.c,v 1.29 2001/07/01 08:21:15 angelos Exp $ */ +/* $OpenBSD: pfkeyv2_parsemessage.c,v 1.30 2001/07/03 05:16:09 angelos Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -739,8 +739,7 @@ pfkeyv2_parsemessage(void *p, int len, void **headers) return EINVAL; } - j = ((strlen(c) + sizeof(uint64_t)) & - ~(sizeof(uint64_t)-1)) + + j = PADUP(strlen(c) + 1) + sizeof(struct sadb_ident); if (i != j) { |