summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2014-10-22 16:35:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2014-10-22 16:35:35 +0000
commit3806108dfc1102cd3226457c782ac5bfe11760f8 (patch)
tree94a3a05b80059b80aee5da210e95e253039a95a9
parent1a626dea2c423653d8834cd32d058834fdea6ff9 (diff)
Fix error reporting when reallocarray() fails. OK miod@
-rw-r--r--sbin/isakmpd/pf_key_v2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c
index 6171067d3d2..782a4d02821 100644
--- a/sbin/isakmpd/pf_key_v2.c
+++ b/sbin/isakmpd/pf_key_v2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_key_v2.c,v 1.189 2014/10/18 03:10:00 doug Exp $ */
+/* $OpenBSD: pf_key_v2.c,v 1.190 2014/10/22 16:35:34 millert Exp $ */
/* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */
/*
@@ -255,8 +255,8 @@ pf_key_v2_read(u_int32_t seq)
}
buf = reallocarray(NULL, hdr.sadb_msg_len, PF_KEY_V2_CHUNK);
if (!buf) {
- log_error("pf_key_v2_read: malloc (%zu) failed",
- hdr.sadb_msg_len * PF_KEY_V2_CHUNK);
+ log_error("pf_key_v2_read: reallocarray (%d, %d) failed",
+ hdr.sadb_msg_len, PF_KEY_V2_CHUNK);
goto cleanup;
}
n = hdr.sadb_msg_len * PF_KEY_V2_CHUNK;