diff options
-rw-r--r-- | usr/src/boot/Makefile.version | 2 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/i386/gptzfsboot/zfsboot.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version index 5d93ec0e76..bf217cddfd 100644 --- a/usr/src/boot/Makefile.version +++ b/usr/src/boot/Makefile.version @@ -33,4 +33,4 @@ LOADER_VERSION = 1.1 # Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes. # The version is processed from left to right, the version number can only # be increased. -BOOT_VERSION = $(LOADER_VERSION)-2020.08.05.1 +BOOT_VERSION = $(LOADER_VERSION)-2020.08.21.1 diff --git a/usr/src/boot/sys/boot/i386/gptzfsboot/zfsboot.c b/usr/src/boot/sys/boot/i386/gptzfsboot/zfsboot.c index 872ad3d3bc..63ba02968a 100644 --- a/usr/src/boot/sys/boot/i386/gptzfsboot/zfsboot.c +++ b/usr/src/boot/sys/boot/i386/gptzfsboot/zfsboot.c @@ -205,7 +205,12 @@ main(void) fd = open(PATH_DOTCONFIG, O_RDONLY); if (fd != -1) { - read(fd, cmd, sizeof (cmd)); + ssize_t cmdlen; + + if ((cmdlen = read(fd, cmd, sizeof (cmd))) > 0) + cmd[cmdlen] = '\0'; + else + *cmd = '\0'; close(fd); } |