svn commit: r269616 - head/sys/boot/common
Marcel Moolenaar
marcel at FreeBSD.org
Tue Aug 5 23:55:24 UTC 2014
Author: marcel
Date: Tue Aug 5 23:55:23 2014
New Revision: 269616
URL: http://svnweb.freebsd.org/changeset/base/269616
Log:
In command_lsmod() prevent overrunning lbuf due to long path
names. Call pager_output() separately for the module name.
Obtained from: Juniper Networks, Inc.
Modified:
head/sys/boot/common/module.c
Modified: head/sys/boot/common/module.c
==============================================================================
--- head/sys/boot/common/module.c Tue Aug 5 23:47:26 2014 (r269615)
+++ head/sys/boot/common/module.c Tue Aug 5 23:55:23 2014 (r269616)
@@ -237,8 +237,10 @@ command_lsmod(int argc, char *argv[])
pager_open();
for (fp = preloaded_files; fp; fp = fp->f_next) {
- sprintf(lbuf, " %p: %s (%s, 0x%lx)\n",
- (void *) fp->f_addr, fp->f_name, fp->f_type, (long) fp->f_size);
+ sprintf(lbuf, " %p: ", (void *) fp->f_addr);
+ pager_output(lbuf);
+ pager_output(fp->f_name);
+ sprintf(lbuf, " (%s, 0x%lx)\n", fp->f_type, (long)fp->f_size);
pager_output(lbuf);
if (fp->f_args != NULL) {
pager_output(" args: ");
More information about the svn-src-head
mailing list