diff --git a/pink/third/slash/slash/src/slash_string.cc b/pink/third/slash/slash/src/slash_string.cc index cd3014ca..a307507f 100644 --- a/pink/third/slash/slash/src/slash_string.cc +++ b/pink/third/slash/slash/src/slash_string.cc @@ -422,7 +422,7 @@ int string2ul(const char *s, size_t slen, unsigned long *lval) { if (!string2ll(s,slen,&llval)) return 0; - if (llval > ULONG_MAX) + if (llval < 0 || llval > (long long)ULONG_MAX) return 0; *lval = (unsigned long)llval;