mirror of https://github.com/MidnightCommander/mc
Tue Dec 8 19:19:39 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* cmd.c (dirsizes_cmd): Fixed possible buffer overflow
This commit is contained in:
parent
f41a3e71b8
commit
9746fb752a
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Dec 8 19:19:39 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||||
|
|
||||||
|
* cmd.c (dirsizes_cmd): Fixed possible buffer overflow
|
||||||
|
|
||||||
1998-12-07 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
1998-12-07 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
* screen.c (do_enter): Return the value from this.
|
* screen.c (do_enter): Return the value from this.
|
||||||
|
|
|
@ -1368,7 +1368,9 @@ void dirsizes_cmd (void)
|
||||||
j += strlen (panel->dir.list [i].fname) + 1;
|
j += strlen (panel->dir.list [i].fname) + 1;
|
||||||
if (!j)
|
if (!j)
|
||||||
return;
|
return;
|
||||||
cmd = xmalloc (strlen (dirsizes_command) + j + 1, "dirsizes_cmd");
|
/* worst case: name_quote doubles every filename, i.e. use
|
||||||
|
2 * j to be save */
|
||||||
|
cmd = xmalloc (strlen (dirsizes_command) + 2 * j + 1, "dirsizes_cmd");
|
||||||
strcpy (cmd, dirsizes_command);
|
strcpy (cmd, dirsizes_command);
|
||||||
p = strchr (cmd, 0);
|
p = strchr (cmd, 0);
|
||||||
for (i = 0; i < panel->count; i++)
|
for (i = 0; i < panel->count; i++)
|
||||||
|
|
Loading…
Reference in New Issue