1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

In command_lsmod() prevent overrunning lbuf due to long path

names. Call pager_output() separately for the module name.

Obtained from:	Juniper Networks, Inc.
This commit is contained in:
Marcel Moolenaar 2014-08-05 23:55:23 +00:00
parent 04584935bc
commit fae00455b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269616

View File

@ -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: ");