We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7f5ae9 commit e5864d1Copy full SHA for e5864d1
src/rtpp_network.c
@@ -375,11 +375,17 @@ int
375
is_numhost(const char *hostnm, int pf)
376
{
377
378
- if ((pf == AF_INET6) && (strcmp(hostnm, "::1") == 0))
379
- return 1;
380
- if ((pf == AF_INET) && (strcmp(hostnm, "127.0.0.1") == 0))
381
382
- return 0;
+ if (pf == AF_INET) {
+ if (strcmp(hostnm, "127.0.0.1") == 0)
+ return 1;
+ return 0;
+ }
383
+ RTPP_DBG_ASSERT(pf == AF_INET6);
384
+ if (strchr(hostnm, '.') != NULL)
385
386
+ if (strspn(hostnm, "0123456789abcdefABCDEF:") != strlen(hostnm))
387
388
389
}
390
391
int
0 commit comments