Fixed buffer overrun in calc.c

This commit is contained in:
Yorhel 2009-05-02 10:21:29 +02:00
parent 0fe0d11e3b
commit 46de3510cd

View file

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