Commit 72b616c8 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* src/eltlparse/eltlscan.ll (_atoi): Fix range checking.

parent e2143c03
......@@ -214,8 +214,8 @@ _atoi(char* yytext, int base)
{
errno = 0;
long i = strtol(yytext, 0, base);
if (i > std::numeric_limits<long>::max() ||
i < std::numeric_limits<long>::min() || errno == ERANGE)
if (i > std::numeric_limits<int>::max() ||
i < std::numeric_limits<int>::min() || errno == ERANGE)
return -1;
return i;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment