mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Fix a core dump caused by negative numbers.
PR: 5858 Submitted by: Max Euston <meuston@jmrodgers.com>
This commit is contained in:
parent
88aa4bcb73
commit
f31bc1dedc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33856
@ -165,6 +165,7 @@ badnum: errx(1, "illegal number: %s", line);
|
||||
if (*line == '-') {
|
||||
(void)printf("minus%s", lflag ? " " : "\n");
|
||||
++line;
|
||||
--len;
|
||||
}
|
||||
|
||||
rval = len > 0 ? unit(len, line) : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user