Commit 3ffb4ae0 authored by Daniel Salzman's avatar Daniel Salzman

keymgr: mute uninitialized pointer read (Coverity)

parent c383037f
......@@ -588,10 +588,8 @@ int keymgr_nsec3_salt_set(kdnssec_ctx_t *ctx, const char *new_salt)
{
assert(new_salt);
dnssec_binary_t salt_bin;
if (strcmp(new_salt, "-") == 0) {
salt_bin.size = 0;
} else {
dnssec_binary_t salt_bin = { 0 };
if (strcmp(new_salt, "-") != 0) {
salt_bin.data = hex_to_bin(new_salt, &salt_bin.size);
if (salt_bin.data == NULL) {
return KNOT_EMALF;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment