Repository navigation
Commit d47c271
Added fix for zpool get state segfaults with two or more vdevs (openzfs#15972). (openzfs#17213)
The problem was identified in handling of the zpool get state command
line arguments. A pointer vdev was used to point to the argv[1], and
its address set to cb.cb_vdevs.cb_names(pointer to array of strings)
so any increment to cb_names resulted in a segfault. Fix covers a
special case of root parameter at argv[1] and remaining cases are
handled by passing in the argv + 1, which allows cb_names iteration
of next command line arguments (vdevs).
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Attila Fülöp <attila@fueloep.org>
Signed-off-by: Syed Shahrukh Hussain <syed.shahrukh@ossrevival.org>1 parent 58ee556 commit d47c271
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12747 | 12747 | | |
12748 | 12748 | | |
12749 | 12749 | | |
12750 | | - | |
12751 | | - | |
12752 | 12750 | | |
12753 | 12751 | | |
12754 | | - | |
| 12752 | + | |
| 12753 | + | |
| 12754 | + | |
| 12755 | + | |
| 12756 | + | |
12755 | 12757 | | |
12756 | 12758 | | |
12757 | 12759 | | |
| |||
0 commit comments