I was having a segmentation fault because i was using a pointer to char

but never indicated a size for the compiler to reserve... malloc()
solves my problem
This commit is contained in:
Jaime Casanova
2010-10-21 14:49:26 -05:00
parent c3595ad89e
commit 7ddc80ea92

View File

@@ -207,7 +207,10 @@ main(int argc, char **argv)
exit(1);
if (config_file == NULL)
{
config_file = malloc(10 + sizeof(CONFIG_FILE));
sprintf(config_file, "./%s", CONFIG_FILE);
}
if (dbname == NULL)
{