summaryrefslogtreecommitdiff
path: root/src/libknot/rdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libknot/rdata.c')
-rw-r--r--src/libknot/rdata.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libknot/rdata.c b/src/libknot/rdata.c
index 352bb6c..d59b4e0 100644
--- a/src/libknot/rdata.c
+++ b/src/libknot/rdata.c
@@ -215,6 +215,9 @@ int knot_rdata_from_wire(knot_rdata_t *rdata, const uint8_t *wire,
int i = 0;
uint8_t item_type;
size_t parsed = 0;
+ if (!rdata || !wire || !pos || !desc) {
+ return KNOT_EINVAL;
+ }
if (rdlength == 0) {
rdata->items = NULL;