diff options
author | Toomas Soome <tsoome@me.com> | 2016-08-05 12:21:40 +0300 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2016-08-05 08:18:33 -0700 |
commit | 305579dffddaa0d1d690a9e3f506d29a8520c230 (patch) | |
tree | 073bf49d786fb1245140e38984fa3dfc7eb90b53 /usr/src/cmd/boot | |
parent | 3bc71695036246c52af58ab0ad58a23a0feb5a0c (diff) | |
download | illumos-gate-305579dffddaa0d1d690a9e3f506d29a8520c230.tar.gz |
7274 installgrub get_start_sector() is dereferencing NULL pointer
Reviewed by: Alexander Pyhalov <apyhalov@gmail.com>
Reviewed by: Adam Stevko <adam.stevko@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/cmd/boot')
-rw-r--r-- | usr/src/cmd/boot/installgrub/installgrub.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/src/cmd/boot/installgrub/installgrub.c b/usr/src/cmd/boot/installgrub/installgrub.c index 18b8f13cd1..9d95b37274 100644 --- a/usr/src/cmd/boot/installgrub/installgrub.c +++ b/usr/src/cmd/boot/installgrub/installgrub.c @@ -875,8 +875,11 @@ found_part: * warn, if Solaris in primary partition and GRUB not in MBR and * partition is not active */ - if (!log_part && part->bootid != 128 && !write_mbr) { - (void) fprintf(stdout, SOLPAR_INACTIVE, device->partition + 1); + if (part != NULL) { + if (!log_part && part->bootid != 128 && !write_mbr) { + (void) fprintf(stdout, SOLPAR_INACTIVE, + device->partition + 1); + } } return (BC_SUCCESS); |