]> git.ipfire.org Git - thirdparty/util-linux.git/commit
Avoid crash in min/max caculation when cpu#0 being offline
authorDirk Mueller <dmueller@suse.com>
Sat, 17 Mar 2018 12:18:38 +0000 (13:18 +0100)
committerDirk Mueller <dmueller@suse.com>
Sat, 17 Mar 2018 12:22:13 +0000 (13:22 +0100)
commit95f09bc63c564c50ec2c393352801cc056faaea2
treeae805fe96a5114892d41ddff88596ba9fb307761
parent80ec018c6a0cf321f7b5d57de948354b0850cc8a
Avoid crash in min/max caculation when cpu#0 being offline

When cpu#0 is offline, atof(NULL) is called which causes
a segfault or endless loop depending on implementation
circumstances. So instead of implicitely assumping that the
first cpu is always available, do the presence checks for
all including the first one.
sys-utils/lscpu.c