summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-05-02 10:21:29 +0200
committerYorhel <git@yorhel.nl>2009-05-02 10:21:29 +0200
commit46de3510cdc2da8f15f3b73c29dbfbd27a7faca7 (patch)
tree40ee5cf9885eb177c7a64151fd9d504142b0e329
parent0fe0d11e3b5198fa45ff3a587e1d65f9742df591 (diff)
Fixed buffer overrun in calc.c
-rw-r--r--src/calc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/calc.c b/src/calc.c
index 61ffa96..6133924 100644
--- a/src/calc.c
+++ b/src/calc.c
@@ -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);