pcpserver.c: copyIPv6IfDifferent() check for NULL src argument

This commit is contained in:
Thomas Bernard 2018-12-18 23:04:14 +01:00
parent f321c2066b
commit cb8a02af7a
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}
}