From a07d99bbefd67a238b66341f84c6c63f7f35540e Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Thu, 28 Aug 2014 07:56:20 -0400 Subject: [master] Corrects medium impact issues reported by Coverity. Merges in rt36933 --- dst/dst_api.c | 2 +- dst/prandom.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'dst') diff --git a/dst/dst_api.c b/dst/dst_api.c index f93ee810..30dc66f5 100644 --- a/dst/dst_api.c +++ b/dst/dst_api.c @@ -819,7 +819,7 @@ dst_key_to_buffer(DST_KEY *key, u_char *out_buff, unsigned buf_len) /* this function will extract the secret of HMAC into a buffer */ if(key == NULL) return (0); - if(key->dk_func != NULL && key->dk_func != NULL) { + if(key->dk_func != NULL && key->dk_func->to_dns_key != NULL) { len = key->dk_func->to_dns_key(key, out_buff, buf_len); if (len < 0) return (0); diff --git a/dst/prandom.c b/dst/prandom.c index ea02a275..7a24d332 100644 --- a/dst/prandom.c +++ b/dst/prandom.c @@ -492,8 +492,7 @@ digest_file(dst_work *work) if (i > 0) work->filled += i; } - else if (i > 0) - my_digest(work, buf, (unsigned)i); + my_digest(work, (const u_char *)name, strlen(name)); return (no + strlen(name)); } -- cgit v1.2.1