summaryrefslogtreecommitdiff
path: root/src/libknot/packet/response.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libknot/packet/response.c')
-rw-r--r--src/libknot/packet/response.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libknot/packet/response.c b/src/libknot/packet/response.c
index 476c6b3..69678c7 100644
--- a/src/libknot/packet/response.c
+++ b/src/libknot/packet/response.c
@@ -368,6 +368,9 @@ static int knot_response_compress_dname(const knot_dname_t *dname,
knot_compr_t *compr, uint8_t *dname_wire, size_t max, int compr_cs)
{
int size = 0;
+ if (!dname || !compr || !dname_wire) {
+ return KNOT_EINVAL;
+ }
// try to find the name or one of its ancestors in the compr. table
#ifdef COMPRESSION_PEDANTIC