Skip to content
Snippets Groups Projects
Commit 3a4f655d authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

worker: avoid uninitialized pointers

The cookie module could segfault due to the `opt` pointer not being
initialized when no EDNS was sent in the incoming request.
parent 9eacf66a
Branches
Tags
1 merge request!53worker: avoid uninitialized pointers
......@@ -259,6 +259,8 @@ static struct qr_task *qr_task_create(struct worker_ctx *worker, uv_handle_t *ha
task->req.qsource.key = NULL;
task->req.qsource.addr = NULL;
task->req.qsource.dst_addr = NULL;
task->req.qsource.packet = NULL;
task->req.qsource.opt = NULL;
/* Remember query source addr */
if (addr) {
size_t addr_len = sizeof(struct sockaddr_in);
......
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