summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:05:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:05:52 +0000
commitd22e397e4b8f49072b655fb520c15732129ed03d (patch)
treed5154651d14dce75f8f694e66ce7936fc79ab29a /sbin
parent999d668af49ba65ca209316fb879a8459e9f850e (diff)
Do not cast a size_t to (unsigned long) to pass it as an argument to malloc.
Like really, who does??!
Diffstat (limited to 'sbin')
-rw-r--r--sbin/isakmpd/nat_traversal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/isakmpd/nat_traversal.c b/sbin/isakmpd/nat_traversal.c
index d85c2a68790..991cbda3519 100644
--- a/sbin/isakmpd/nat_traversal.c
+++ b/sbin/isakmpd/nat_traversal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nat_traversal.c,v 1.23 2015/08/20 22:02:21 deraadt Exp $ */
+/* $OpenBSD: nat_traversal.c,v 1.24 2015/08/20 22:05:51 deraadt Exp $ */
/*
* Copyright (c) 2004 Håkan Olsson. All rights reserved.
@@ -227,7 +227,7 @@ nat_t_generate_nat_d_hash(struct message *msg, struct sockaddr *sa,
*hashlen = hash->hashsize;
- res = malloc((unsigned long)*hashlen);
+ res = malloc(*hashlen);
if (!res) {
log_print("nat_t_generate_nat_d_hash: malloc (%lu) failed",
(unsigned long)*hashlen);