Skip to content
Snippets Groups Projects
Commit 7870a2fc authored by Karel Slaný's avatar Karel Slaný Committed by Ondřej Surý
Browse files

Fixed error.

parent 7ae5b6b5
No related merge requests found
......@@ -59,7 +59,10 @@ int kr_cookie_lru_set(kr_cookie_lru_t *cache, const struct sockaddr *sa,
return kr_error(ENOMEM);
}
memcpy(cached->opt_data, opt, knot_edns_opt_get_length(opt));
uint16_t opt_size = KNOT_EDNS_OPTION_HDRLEN +
knot_edns_opt_get_length(opt);
memcpy(cached->opt_data, opt, opt_size);
return kr_ok();
}
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