NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/53022: gpt(8) segfaults if invoked without device specified
>Number: 53022
>Category: bin
>Synopsis: gpt(8) segfaults if invoked without device specified
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 13 01:10:00 +0000 2018
>Originator: Sevan Janiyan
>Release: NetBSD-HEAD
>Organization:
>Environment:
>Description:
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)
return usage();
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.
>How-To-Repeat:
run gpart show -a
>Fix:
Home |
Main Index |
Thread Index |
Old Index