diff options
author | dusanx <ef_dva@yahoo.com> | 2009-04-28 10:33:29 +0200 |
---|---|---|
committer | dusanx <ef_dva@yahoo.com> | 2009-04-28 10:33:29 +0200 |
commit | 80dedbd75159292dceea87bab4c5b90fd1bdd33e (patch) | |
tree | 70ab241682bb8336626a7de3298a52af92da22fa /uzbl.c | |
parent | 5586e11f8ac6265472b92dbb9a99ff0b7052d1e2 (diff) |
Possible Debian segfault fix
Diffstat (limited to 'uzbl.c')
-rw-r--r-- | uzbl.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -520,8 +520,9 @@ settings_init () { printf("XDG_CONFIG_DIRS: %s\n", XDG_CONFIG_DIRS); - char *dirs = XDG_CONFIG_DIRS; - char *dir = (char *)strtok (dirs, ":"); + char buffer[512]; + strcpy (buffer, XDG_CONFIG_DIRS); + const gchar* dir = strtok (buffer, ":"); while (dir && ! file_exists (conf)) { strcpy (conf, dir); strcat (conf, "/uzbl/config"); @@ -529,7 +530,7 @@ settings_init () { printf ("Config file %s found.\n", conf); config_file = &conf[0]; } - dir = (char *)strtok (NULL, ":"); + dir = strtok (NULL, ":"); } } } |