mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix bug parsing 32 bit integers on machines where sizeof(long) == 4.
This commit is contained in:
parent
9300c69625
commit
2076235ada
1 changed files with 2 additions and 1 deletions
|
|
@ -465,7 +465,8 @@ ng_int32_parse(const struct ng_parse_type *type,
|
|||
char *eptr;
|
||||
|
||||
val = strtol(s + *off, &eptr, 0);
|
||||
if (val < -0x80000000 || val > 0xffffffff || eptr == s + *off)
|
||||
if (val < (long)-0x80000000
|
||||
|| val > (u_long)0xffffffff || eptr == s + *off)
|
||||
return (EINVAL);
|
||||
*off = eptr - s;
|
||||
val32 = (int32_t)val;
|
||||
|
|
|
|||
Loading…
Reference in a new issue