summaryrefslogtreecommitdiff
path: root/dst
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2014-08-28 07:56:20 -0400
committerThomas Markwalder <tmark@isc.org>2014-08-28 08:12:30 -0400
commita07d99bbefd67a238b66341f84c6c63f7f35540e (patch)
tree07bb7bcc8187364b785423822ddcd8dde667319c /dst
parent36e2c22493c0f2357aec2ccf4ed37c2eb676bc56 (diff)
downloadisc-dhcp-a07d99bbefd67a238b66341f84c6c63f7f35540e.tar.gz
[master] Corrects medium impact issues reported by Coverity.
Merges in rt36933
Diffstat (limited to 'dst')
-rw-r--r--dst/dst_api.c2
-rw-r--r--dst/prandom.c3
2 files changed, 2 insertions, 3 deletions
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));
}