Merge pull request #424 from maciejsszmigiero/anchor-fixes

Two small trust anchor fetcher fixes
This commit is contained in:
wtoorop 2019-03-24 08:47:26 +01:00 committed by GitHub
commit bc6adf01ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -750,7 +750,7 @@ static void tas_doc_read(getdns_context *context, tas_connection *a)
a->tcp.read_pos = a->tcp.read_buf; a->tcp.read_pos = a->tcp.read_buf;
a->tcp.to_read = sizeof(context->tas_hdr_spc); a->tcp.to_read = sizeof(context->tas_hdr_spc);
} }
GETDNS_SCHEDULE_EVENT(a->loop, a->fd, 50, GETDNS_SCHEDULE_EVENT(a->loop, a->fd, 2000,
getdns_eventloop_event_init(&a->event, a->req->owner, getdns_eventloop_event_init(&a->event, a->req->owner,
tas_read_cb, NULL, tas_reconnect_cb)); tas_read_cb, NULL, tas_reconnect_cb));
return; return;
@ -1086,11 +1086,11 @@ static void tas_connect(getdns_context *context, tas_connection *a)
} }
if (a->state == TAS_RETRY_GET_PS7) { if (a->state == TAS_RETRY_GET_PS7) {
buf_sz = sizeof(tas_write_p7s_buf) buf_sz = sizeof(tas_write_p7s_buf)
+ 1 * (hostname_len - 2) + 1 * (path_len - 2) + 1; + 1 * (hostname_len - 2) + 1 * (path_len - 2);
fmt = tas_write_p7s_buf; fmt = tas_write_p7s_buf;
} else { } else {
buf_sz = sizeof(tas_write_xml_p7s_buf) buf_sz = sizeof(tas_write_xml_p7s_buf)
+ 2 * (hostname_len - 2) + 2 * (path_len - 2) + 1; + 2 * (hostname_len - 2) + 2 * (path_len - 2);
fmt = tas_write_xml_p7s_buf; fmt = tas_write_xml_p7s_buf;
} }
if (!(write_buf = GETDNS_XMALLOC(context->mf, char, buf_sz))) { if (!(write_buf = GETDNS_XMALLOC(context->mf, char, buf_sz))) {