summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-09-27 19:09:37 +0300
committerToomas Soome <tsoome@me.com>2019-09-30 22:40:57 +0300
commite10751a53e4fcc2850e57448ad13dc3caf40595e (patch)
tree9695788be6fb66ffb598c71a9fbfce3c6cef93d1
parenteb62f060787d63335f2b0777ff86c16204bca93a (diff)
downloadillumos-joyent-e10751a53e4fcc2850e57448ad13dc3caf40595e.tar.gz
11755 loader: command_lsmod does show garbage on screen
Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/boot/Makefile.version2
-rw-r--r--usr/src/boot/sys/boot/common/module.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version
index faf491c1af..67889d27d9 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)-2019.09.20.1
+BOOT_VERSION = $(LOADER_VERSION)-2019.09.27.1
diff --git a/usr/src/boot/sys/boot/common/module.c b/usr/src/boot/sys/boot/common/module.c
index ca4090fc24..643625c347 100644
--- a/usr/src/boot/sys/boot/common/module.c
+++ b/usr/src/boot/sys/boot/common/module.c
@@ -263,7 +263,7 @@ command_lsmod(int argc, char *argv[])
break;
if (strcmp(fp->f_type, "hash") == 0) {
pager_output(" contents: ");
- strncpy(lbuf, PTOV(fp->f_addr), fp->f_size);
+ strlcpy(lbuf, PTOV(fp->f_addr), sizeof (lbuf));
if (pager_output(lbuf))
break;
}