From bc645c108da6090c349c75e579f8fd3cfa0a3da6 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 2 Jun 2020 09:08:59 +0200 Subject: [PATCH] same fix as 827fc6f04 for SendSSDPGoodbye() see #459 --- miniupnpd/minissdp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miniupnpd/minissdp.c b/miniupnpd/minissdp.c index 531b925..64257ca 100644 --- a/miniupnpd/minissdp.c +++ b/miniupnpd/minissdp.c @@ -1449,7 +1449,8 @@ SendSSDPGoodbye(int * sockets, int n_sockets) known_service_types[i].s, ver_str, /* NT: */ known_service_types[i].uuid, "::", known_service_types[i].s); /* ver_str, USN: */ - if(0==memcmp(known_service_types[i].s, + if(i > 0 && /* only known_service_types[0].s is shorter than "urn:schemas-upnp-org:device" */ + 0==memcmp(known_service_types[i].s, "urn:schemas-upnp-org:device", sizeof("urn:schemas-upnp-org:device")-1)) { ret += SendSSDPbyebye(sockets[j],