mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-29 04:21:26 +01:00
Make get_int() think that "" (null) has the integer value 0.
(Which is the same behaviour as in 1.x) The install blows up without this. Reviewed by: rgrimes
This commit is contained in:
parent
99504c52a3
commit
a837391e87
@ -529,6 +529,11 @@ get_int(v, lp)
|
||||
|
||||
for (; *v && isspace(*v); ++v);
|
||||
|
||||
if(!*v) {
|
||||
*lp = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (isdigit(*v) || ((*v == '-' || *v == '+') && isdigit(*(v+1)))) {
|
||||
errno = 0;
|
||||
val = strtol(v, &ep, 10);
|
||||
|
Loading…
Reference in New Issue
Block a user