]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lscpu: fix floating point exception
authorSami Kerola <kerolasa@iki.fi>
Sat, 18 May 2019 17:43:08 +0000 (18:43 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sat, 18 May 2019 17:43:08 +0000 (18:43 +0100)
commit23df051030add5f755633fc7a88ea66404f26adf
tree5725ee66aa72640e4524679101f8c57f3227c828
parentd2a1ee4e56182ba746053c6d41b6f29a2ce5554b
lscpu: fix floating point exception

As the title tells this change indeed fixes floating point exception, but
post processing as value overwrite feels a wrong.  Possibly something in
input is making cpu set count to go wrong, but I could not get my head
around what could it be.  Anyway avoiding division by zero seems better than
crashing so lets do this atleast for now.

Caused-by: e5f721132ec8b8c933a396d8dcb3efcb67854f13
Addresses: https://github.com/karelzak/util-linux/issues/788
Reported-by: Lars Wendler <polynomial-c@gentoo.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/lscpu.c
tests/expected/lscpu/lscpu-vmware_fpe [new file with mode: 0644]
tests/ts/lscpu/dumps/vmware_fpe.tar.gz [new file with mode: 0644]