summaryrefslogtreecommitdiffstats
path: root/dns.c
diff options
context:
space:
mode:
authorderaadt@openbsd.org <deraadt@openbsd.org>2015-08-21 00:32:42 +0200
committerDamien Miller <djm@mindrot.org>2015-08-21 05:43:25 +0200
commitce445b0ed927e45bd5bdce8f836eb353998dd65c (patch)
tree34170a772ddf573879b8ae244bafd6871be0fd11 /dns.c
parentupstream commit (diff)
downloadopenssh-ce445b0ed927e45bd5bdce8f836eb353998dd65c.tar.xz
openssh-ce445b0ed927e45bd5bdce8f836eb353998dd65c.zip
upstream commit
Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope ok krw millert Upstream-ID: 5e50ded78cadf3841556649a16cc4b1cb6c58667
Diffstat (limited to 'dns.c')
-rw-r--r--dns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dns.c b/dns.c
index f201b602e..e813afeae 100644
--- a/dns.c
+++ b/dns.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dns.c,v 1.34 2015/01/28 22:36:00 djm Exp $ */
+/* $OpenBSD: dns.c,v 1.35 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -154,7 +154,7 @@ dns_read_rdata(u_int8_t *algorithm, u_int8_t *digest_type,
*digest_len = rdata_len - 2;
if (*digest_len > 0) {
- *digest = (u_char *) xmalloc(*digest_len);
+ *digest = xmalloc(*digest_len);
memcpy(*digest, rdata + 2, *digest_len);
} else {
*digest = (u_char *)xstrdup("");