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

libknot: better assert in knot_rdata_init

parent efb894a4
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -51,9 +51,11 @@ typedef struct {
inline static void knot_rdata_init(knot_rdata_t *rdata, uint16_t len, const uint8_t *data)
{
assert(rdata);
assert(data);
rdata->len = len;
memcpy(rdata->data, data, len);
if (rdata->len > 0) {
assert(data);
memcpy(rdata->data, data, len);
}
}
/*!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment