12729 bootadm set-menu timeout crashes without timeout value

Review Request #2554 — Created May 13, 2020 and submitted

alhazred
illumos-gate
master
https://www.illumos.org/issues/12729
general
tsoome

12729 bootadm set-menu timeout crashes without timeout value

Without fix:
root@omniosce:~# bootadm set-menu timeout
Segmentation Fault (core dumped)

With fix:
root@omniosce:~# ./bootadm set-menu timeout
bootadm: missing timeout value
root@omniosce:~# ./bootadm set-menu timeout=
bootadm: invalid timeout:
root@omniosce:~# ./bootadm set-menu timeout=10
root@omniosce:~#

  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
yuripv
  1. 
      
  2. Synopsis says 'key=value', so apparently we must have the value, and should error here if val is NULL.

  3. It looks like this path is affected as well, fix both?

    1. Ah, tired eyes, thanks

  4. 
      
alhazred
tsoome
  1. Ship It!
  2. 
      
yuripv
  1. Ship It!
  2. 
      
domag02
  1. Ship it!
    Note: There is a standard function to handle these type of suboptions, and it's called getsubopt(3C).

  2. 
      
alhazred
Review request changed

Status: Closed (submitted)

Loading...