Project

General

Profile

Bug #14154

Updated by Toomas Soome 3 months ago

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

 Testing done: 

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

 after patch: 

 <pre> 
 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$  
 </pre>

Back