Skip to content
Snippets Groups Projects
Commit 2967fd1e authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

knsupdate: fix segfault when no secret is found in the keyfile

parent af653c77
No related branches found
No related tags found
No related merge requests found
......@@ -699,7 +699,7 @@ int cmd_send(const char* lp, nsupdate_params_t *params)
size_t dlen = 0;
uint8_t *digest = NULL;
size_t maxlen = knot_packet_max_size(params->pkt);
if (params->key.name) {
if (params->key.secret) {
dlen = tsig_alg_digest_length(params->key.algorithm);
digest = malloc(dlen);
ret = knot_tsig_sign(wire, &len, maxlen, NULL, 0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment