aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl.c
diff options
context:
space:
mode:
authorGravatar dusanx <ef_dva@yahoo.com>2009-04-28 10:33:29 +0200
committerGravatar dusanx <ef_dva@yahoo.com>2009-04-28 10:33:29 +0200
commit80dedbd75159292dceea87bab4c5b90fd1bdd33e (patch)
tree70ab241682bb8336626a7de3298a52af92da22fa /uzbl.c
parent5586e11f8ac6265472b92dbb9a99ff0b7052d1e2 (diff)
Possible Debian segfault fix
Diffstat (limited to 'uzbl.c')
-rw-r--r--uzbl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/uzbl.c b/uzbl.c
index 8eefe84..ee10237 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -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, ":");
}
}
}