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

semantic check for RRSIG: improve info string construction

refs #4
parent 8211f019
No related branches found
No related tags found
No related merge requests found
......@@ -293,8 +293,13 @@ static int check_rrsig_rdata(err_handler_t *handler,
const knot_rrset_t *dnskey_rrset)
{
/* Prepare additional info string. */
char info_str[50] = "Record type: ";
knot_rrtype_to_string(knot_rrset_type(rrset), info_str + 13, 47);
char info_str[50] = { '\0' };
char type_str[10] = { '\0' };
knot_rrtype_to_string(knot_rrset_type(rrset), type_str, sizeof(type_str));
int ret = snprintf(info_str, sizeof(info_str), "Record type: %s", type_str);
if (ret < 0 || ret >= sizeof(info_str)) {
return KNOT_ENOMEM;
}
if (knot_rrset_rdata_rr_count(rrsig) == 0) {
err_handler_handle_error(handler, node, ZC_ERR_RRSIG_NO_RRSIG,
......
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