diff --git a/upnp/src/ssdp/ssdp_ctrlpt.c b/upnp/src/ssdp/ssdp_ctrlpt.c index 3489fd3..d2e3c7a 100644 --- a/upnp/src/ssdp/ssdp_ctrlpt.c +++ b/upnp/src/ssdp/ssdp_ctrlpt.c @@ -344,6 +344,8 @@ static int CreateClientRequestPacket( } else if (AddressFamily == AF_INET6) { rc = snprintf(TempBuf, sizeof(TempBuf), "HOST: [%s]:%d\r\n", SSDP_IPV6_LINKLOCAL, SSDP_PORT); + } else { + return UPNP_E_INVALID_ARGUMENT; } if (rc < 0 || (unsigned int) rc >= sizeof(TempBuf)) return UPNP_E_INTERNAL_ERROR;