Commit 728b2b2a authored by Aurelio Colosimo's avatar Aurelio Colosimo

bugfix: allocation of conf_buf arg of calloc was wrong

Signed-off-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
parent 12aa6332
......@@ -56,7 +56,7 @@ int main(int argc, char **argv)
}
else {
int r = 0, next_r;
conf_buf = calloc(1, conf_fs.st_size) + 1;
conf_buf = calloc(1, conf_fs.st_size + 1);
do {
next_r = conf_fs.st_size - r;
......
......@@ -72,7 +72,7 @@ int main(int argc, char **argv)
}
else {
int r = 0, next_r;
conf_buf = calloc(1, conf_fs.st_size) + 1;
conf_buf = calloc(1, conf_fs.st_size + 1);
do {
next_r = conf_fs.st_size - r;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment