Repository navigation
Commit f8e6416
committed
parse-util: refuse negative load averages with a zero integer part
parse_loadavg_fixed_point() parses both parts of the value with
safe_atolu_full(), which refuses negative numbers with ERANGE, except
for "-0". Hence "-4000.5" was refused, but "-0.50" was accepted as 0.50
and "1.-0" as 1.00.
Refuse the "-" explicitly, like parse_parts_value_*() in percent-util
now do.1 parent 886b17c commit f8e6416
2 files changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
819 | 824 | | |
820 | 825 | | |
821 | 826 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
867 | 870 | | |
868 | 871 | | |
869 | 872 | | |
| |||
0 commit comments