upnpsoap.c: ExecuteSoapAction() use memchr() instead of strchr()

This commit is contained in:
Thomas Bernard 2023-12-29 18:22:38 +01:00
parent a5fd382e95
commit 84cd9e6289
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF

View File

@ -2350,8 +2350,8 @@ ExecuteSoapAction(struct upnphttp * h, const char * action, int n)
/* SoapAction example :
* urn:schemas-upnp-org:service:WANIPConnection:1#GetStatusInfo */
p = strchr(action, '#');
if(p && (p - action) < n) {
p = memchr(action, '#', n);
if(p) {
for(i = 0; i < ((int)sizeof(namespace) - 1) && (action + i) < p; i++)
namespace[i] = action[i];
namespace[i] = '\0';