]> git.proxmox.com Git - mirror_zfs.git/commit - cmd/ztest.c
libzfs: Fix bounds checks for float parsing
authorRyan Moeller <ryan@iXsystems.com>
Mon, 16 Mar 2020 18:56:29 +0000 (14:56 -0400)
committerGitHub <noreply@github.com>
Mon, 16 Mar 2020 18:56:29 +0000 (11:56 -0700)
commit4d32abaa874db06ec84aeefafa1354548f91d650
treed198dcc0c8522f04df7455ba6640595c94234f26
parent7261fc2e8136f99b89851fa853f7862db45437c3
libzfs: Fix bounds checks for float parsing

UINT64_MAX is not exactly representable as a double.

The closest representation is UINT64_MAX + 1, so we can use a >=
comparison instead of > for the bounds check.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10127
cmd/ztest/ztest.c
lib/libzfs/libzfs_util.c