summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-sysdeps.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/dbus-sysdeps.c')
-rw-r--r--dbus/dbus-sysdeps.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c
index c310b281..cd3e20e7 100644
--- a/dbus/dbus-sysdeps.c
+++ b/dbus/dbus-sysdeps.c
@@ -750,6 +750,12 @@ _dbus_string_parse_double (const DBusString *str,
p = _dbus_string_get_const_data_len (str, start,
_dbus_string_get_length (str) - start);
+ /* parsing hex works on linux but isn't portable, so intercept it
+ * here to get uniform behavior.
+ */
+ if (p[0] == '0' && (p[1] == 'x' || p[1] == 'X'))
+ return FALSE;
+
end = NULL;
errno = 0;
v = ascii_strtod (p, &end);