[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/53022: gpt(8) segfaults if invoked without device specified
>Synopsis: gpt(8) segfaults if invoked without device specified
>Arrival-Date: Tue Feb 13 01:10:00 +0000 2018
>Originator: Sevan Janiyan
gpt(8) assumes the device has been passed when invoked & attempts to enumerated the device in src/sbin/gpt/main.c, then ploughs forward.
As a work around I've added a check in each cmd_$command()
if (gpt == NULL)
which works and has the benefit of returning the relevant usage for the sub command being invoked. On the other hand, I haven't worked out how to hand things in main() to stop right at the start so I only have to deal with the issue in one place.
run gpart show -a
Main Index |
Thread Index |