]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
worker: fixed a mistakenly used pkt_buf instead of pkt
authorMarek Vavruša <mvavrusa@cloudflare.com>
Sat, 21 Apr 2018 07:12:03 +0000 (00:12 -0700)
committerMarek Vavruša <mvavrusa@cloudflare.com>
Fri, 7 Sep 2018 17:45:21 +0000 (10:45 -0700)
The `pkt` is set to NULL above, but it's not used and `pkt_buf` is used instead,
it may point to an invalid packet and cause problems further down.

daemon/tls.c

index 5424cfc59f6419b4f114b3f222c69978a97bd3b7..41b6dd8ecc50836fcd9adba7cb73d1e626f8a76f 100644 (file)
@@ -221,8 +221,6 @@ int tls_push(struct qr_task *task, uv_handle_t *handle, knot_pkt_t *pkt)
 
        tls_ctx->task = task;
 
-       assert(gnutls_record_check_corked(tls_session) == 0);
-
        gnutls_record_cork(tls_session);
        ssize_t count = 0;
        if ((count = gnutls_record_send(tls_session, &pkt_size, sizeof(pkt_size)) < 0) ||