Date: Tue, 5 Aug 2014 23:55:23 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269616 - head/sys/boot/common Message-ID: <53e16eeb.535b.389e3ae4@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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: ");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e16eeb.535b.389e3ae4>