Project

General

Profile

Actions

Bug #14154

closed

zpool should call zfs_nicestrtonum() with non-NULL handle

Added by Toomas Soome 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

To get proper error diagnostics, we should not call zfs_nicestrtonum() with NULL.

Testing done:

Before patch:

tsoome@beastie:/code/14154/usr/src/cmd/zpool$ zpool trim -r 10X rpool
Segmentation Fault (core dumped)

after patch:

tsoome@beastie:/code/14154/usr/src/cmd/zpool$ ./zpool trim -r 10X rpool
invalid value for rate: invalid numeric suffix 'X'
usage:
        trim [-d] [-r <rate>] [-c | -s] <pool> [<device> ...]
tsoome@beastie:/code/14154/usr/src/cmd/zpool$ 

Related issues

Related to illumos gate - Bug #14153: libzfs: str2shift called with NULL handle can crashClosedToomas Soome

Actions
Actions

Also available in: Atom PDF