Skip to content
Snippets Groups Projects
Commit 4cfed39d authored by Daniel Salzman's avatar Daniel Salzman
Browse files

tests/edns: fix possible NULL dereference (Coverity)

parent 72e11083
Branches
Tags
No related merge requests found
Pipeline #27202 passed with stages
in 21 minutes and 48 seconds
......@@ -69,6 +69,10 @@ static const uint16_t DO_FLAG = (uint16_t)1 << 15;
static void check_ttl(knot_rdata_t *rdata, uint8_t ext_rcode, uint8_t ver,
uint16_t flags, char *msg)
{
if (rdata == NULL) {
return;
}
/* TTL should be stored in machine byte order.
We need network byte order to compare its parts. */
uint8_t ttl_wire[4] = { 0, 0, 0, 0 };
......
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