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

Merge branch 'worker-uninit' into 'master'

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.

See merge request !53
parents 9eacf66a 3a4f655d
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