summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 671b799)
raw | patch | inline | side by side (parent: 671b799)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 30 Oct 2008 15:27:37 +0000 (16:27 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 30 Oct 2008 15:39:18 +0000 (16:39 +0100) |
The memory allocated to store the information about configured directories did
not take into account the newly added directory. This would cause a segfault
at some point of time (when specifying more than four directories in my case).
Thanks to Martin Janota <janota.m@cce.cz> for finding and reporting this bug.
not take into account the newly added directory. This would cause a segfault
at some point of time (when specifying more than four directories in my case).
Thanks to Martin Janota <janota.m@cce.cz> for finding and reporting this bug.
src/filecount.c | patch | blob | history |
diff --git a/src/filecount.c b/src/filecount.c
index 55b3655ebaccd877b1a3c844839d1fbcd4e60e79..f0713795f52100f909cb61a6fb52f313a19737d5 100644 (file)
--- a/src/filecount.c
+++ b/src/filecount.c
fc_directory_conf_t **temp;
temp = (fc_directory_conf_t **) realloc (directories,
- sizeof (*directories) * directories_num);
+ sizeof (*directories) * (directories_num + 1));
if (temp == NULL)
{
ERROR ("filecount plugin: realloc failed.");