From cb8a02af7a5677cf608e86d57ab04241cf34e24f Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 18 Dec 2018 23:04:14 +0100 Subject: [PATCH] pcpserver.c: copyIPv6IfDifferent() check for NULL src argument --- miniupnpd/pcpserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniupnpd/pcpserver.c b/miniupnpd/pcpserver.c index 9acfb44..a964aa9 100644 --- a/miniupnpd/pcpserver.c +++ b/miniupnpd/pcpserver.c @@ -177,7 +177,7 @@ static const char * getPCPOpCodeStr(uint8_t opcode) * buffers are same */ static void copyIPv6IfDifferent(void * dest, const void * src) { - if(dest != src) { + if(dest != src && src != NULL) { memcpy(dest, src, sizeof(struct in6_addr)); } }