undefined1 * __numeric_to_ipaddr(char *param_1,char param_2)
{
bool bVar1;
char *pcVar2;
int iVar3;
undefined1 *puVar4;
int iVar5;
char *__dest;
undefined1 *puVar6;
undefined1 local_40 [4];
char acStack_3c [19];
undefined1 local_29;
__dest = acStack_3c;
strncpy(__dest,param_1,0x13) //possible issue identified - semgrep
local_29 = 0;
puVar6 = &addr_5260;
iVar5 = 0;
do {
pcVar2 = strchr(__dest,0x2e);
if (pcVar2 == (char *)0x0) {
if (param_2 != '\0') {
return (undefined1 *)0x0;
}
iVar3 = xtables_strtoui(__dest,0,local_40,0,0xff);
if (iVar3 != 0) {
(&addr_5260)[iVar5] = local_40[0];
puVar6 = &addr_5260 + iVar5;
while( true ) {
bVar1 = 2 < iVar5;
puVar6 = puVar6 + 1;
iVar5 = iVar5 + 1;
if (bVar1) break;
*puVar6 = 0;
}
return &addr_5260;
}
goto LAB_00012914;
}
*pcVar2 = '\0';
iVar3 = xtables_strtoui(__dest,0,local_40,0,0xff);
puVar4 = &addr_5260 + iVar5;
iVar5 = iVar5 + 1;
__dest = pcVar2 + 1;
if (iVar3 == 0) goto LAB_00012914;
*puVar4 = local_40[0];
} while (iVar5 != 3);
iVar5 = xtables_strtoui(__dest,0,local_40,0,0xff);
if (iVar5 == 0) {
LAB_00012914:
puVar6 = (undefined1 *)0x0;
}
else {
DAT_0002672f = local_40[0];
}
return puVar6;
}