![]() ![]() | ![]() |
version 1.1.1.1, 2012/02/21 17:26:11 | version 1.1.1.2, 2012/10/09 09:22:28 |
---|---|
Line 233 str2tag (const char *str, u_char *tag) | Line 233 str2tag (const char *str, u_char *tag) |
char *endptr; | char *endptr; |
u_int32_t t; | u_int32_t t; |
l = strtoul (str, &endptr, 10); | if (*str == '-') |
return 0; | |
if (*endptr == '\0' || l == ULONG_MAX || l > UINT32_MAX) | errno = 0; |
l = strtoul (str, &endptr, 10); | |
if (*endptr != '\0' || errno || l > UINT32_MAX) | |
return 0; | return 0; |
t = (u_int32_t) l; | t = (u_int32_t) l; |