mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Fixed buffer overrun in calc.c
This commit is contained in:
parent
0fe0d11e3b
commit
46de3510cd
1 changed files with 1 additions and 1 deletions
|
|
@ -343,7 +343,7 @@ void calc_process() {
|
|||
t->name = malloc(strlen(orig->name)+1);
|
||||
strcpy(t->name, orig->name);
|
||||
} else {
|
||||
t->name = malloc(strlen(path)+strlen(name)+1);
|
||||
t->name = malloc(strlen(path)+strlen(name)+2);
|
||||
t->name[0] = 0;
|
||||
if(strcmp(path, "/"))
|
||||
strcpy(t->name, path);
|
||||
|
|
|
|||
Loading…
Reference in a new issue