diff --git a/tests/unit/unit1650.c b/tests/unit/unit1650.c index 723c064216..ddf228f8d9 100644 --- a/tests/unit/unit1650.c +++ b/tests/unit/unit1650.c @@ -170,7 +170,7 @@ UNITTEST_START fprintf(stderr, "DNS encode made: %s\n", hexdump(buffer, size)); return 2; } - else if(memcmp(req[i].packet, buffer, size)) { + else if(req[i].packet && memcmp(req[i].packet, buffer, size)) { fprintf(stderr, "DNS encode made: %s\n", hexdump(buffer, size)); fprintf(stderr, "... instead of: %s\n", hexdump((unsigned char *)req[i].packet, size));