Client: Fix ssl crash issue.

This commit is contained in:
Nick Peng
2020-08-02 01:00:46 +08:00
parent bc0d6b89ca
commit 297ea29639
4 changed files with 46 additions and 32 deletions

View File

@@ -947,6 +947,16 @@ void get_compiled_time(struct tm *tm)
tm->tm_sec = sec;
}
int is_numeric(const char *str)
{
while (*str != '\0') {
if (*str < '0' || *str > '9')
return -1;
str++;
}
return 0;
}
int has_network_raw_cap(void)
{
int fd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);