Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
72b616c8
Commit
72b616c8
authored
Jan 12, 2014
by
Alexandre Duret-Lutz
Browse files
* src/eltlparse/eltlscan.ll (_atoi): Fix range checking.
parent
e2143c03
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/eltlparse/eltlscan.ll
View file @
72b616c8
...
...
@@ -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
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment