summaryrefslogtreecommitdiff
path: root/gconf/gconf.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2005-12-08 13:00:58 +0000
committerDan Williams <dcbw@src.gnome.org>2005-12-08 13:00:58 +0000
commit771c20ca14a6438ed344a53a810b28025476f445 (patch)
tree44d709afd144488e9085c1e94e4841b733689133 /gconf/gconf.c
parentdfa8dfce1722858007d6631c9bb85df35a7d5cd2 (diff)
downloadgconf-771c20ca14a6438ed344a53a810b28025476f445.tar.gz
Don't stomp on the function-level scoped 'end' from deep in the function.
2005-12-08 Dan Williams <dcbw@redhat.com> * gconf/gconf.c: (gconf_unescape_string): Don't stomp on the function-level scoped 'end' from deep in the function. Fixes a segfault.
Diffstat (limited to 'gconf/gconf.c')
-rw-r--r--gconf/gconf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gconf/gconf.c b/gconf/gconf.c
index 2bc87083..02b70080 100644
--- a/gconf/gconf.c
+++ b/gconf/gconf.c
@@ -2749,10 +2749,11 @@ gconf_unescape_key (const char *escaped_key,
if (*p == '@')
{
/* *p is the @ that ends a seq */
+ char *end_seq;
guchar val;
- val = strtoul (start_seq, &end, 10);
- if (start_seq != end)
+ val = strtoul (start_seq, &end_seq, 10);
+ if (start_seq != end_seq)
g_string_append_c (retval, val);
start_seq = NULL;