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