From 5996294a954e3013ade0719f3c0c7389d3d333f7 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Mar 2006 00:06:48 +1100 Subject: [PATCH] - deraadt@cvs.openbsd.org 2006/03/20 18:41:43 [dns.c] cast xstrdup to propert u_char * --- ChangeLog | 5 ++++- dns.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 559639b89..f7dceae92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -50,6 +50,9 @@ - deraadt@cvs.openbsd.org 2006/03/20 18:26:55 [session.h] annoying spacing fixes getting in the way of real diffs + - deraadt@cvs.openbsd.org 2006/03/20 18:41:43 + [dns.c] + cast xstrdup to propert u_char * 20060318 - (djm) [auth-pam.c] Fix memleak in error path, from Coverity via @@ -4242,4 +4245,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4238 2006/03/25 13:06:32 djm Exp $ +$Id: ChangeLog,v 1.4239 2006/03/25 13:06:48 djm Exp $ diff --git a/dns.c b/dns.c index e9270798d..83d4d895a 100644 --- a/dns.c +++ b/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.17 2006/03/19 18:51:18 deraadt Exp $ */ +/* $OpenBSD: dns.c,v 1.18 2006/03/20 18:41:43 deraadt Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -121,7 +121,7 @@ dns_read_rdata(u_int8_t *algorithm, u_int8_t *digest_type, *digest = (u_char *) xmalloc(*digest_len); memcpy(*digest, rdata + 2, *digest_len); } else { - *digest = xstrdup(""); + *digest = (u_char *)xstrdup(""); } success = 1;