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:
parent
04584935bc
commit
fae00455b5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269616
@ -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: ");
|
||||
|
Loading…
Reference in New Issue
Block a user