From fafabbb4907d3c8fdc1e6c8c0b05bca179657a3d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 31 Jul 2006 05:10:28 +0000 Subject: [PATCH] Make it only accept those characters that we accept i 2006-07-31 Behdad Esfahbod * glib/guniprop.c (g_unichar_isxdigit): Make it only accept those characters that we accept i g_unichar_xdigit_value(), i.e. don't accept non-decimal digits. (#347842, Nikolai Weibull) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ glib/guniprop.c | 7 +------ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e99a6a3..94c8e79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-07-31 Behdad Esfahbod + * glib/guniprop.c (g_unichar_isxdigit): Make it only accept those + characters that we accept i g_unichar_xdigit_value(), i.e. don't + accept non-decimal digits. (#347842, Nikolai Weibull) + +2006-07-31 Behdad Esfahbod + * glib/gunidecomp.c (_g_utf8_normalize_wc): Update to reflect Unicode PR #29 (#348694, Nikolai Weibull) diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index e99a6a3..94c8e79 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,5 +1,11 @@ 2006-07-31 Behdad Esfahbod + * glib/guniprop.c (g_unichar_isxdigit): Make it only accept those + characters that we accept i g_unichar_xdigit_value(), i.e. don't + accept non-decimal digits. (#347842, Nikolai Weibull) + +2006-07-31 Behdad Esfahbod + * glib/gunidecomp.c (_g_utf8_normalize_wc): Update to reflect Unicode PR #29 (#348694, Nikolai Weibull) diff --git a/glib/guniprop.c b/glib/guniprop.c index b3e2956..d80ec03 100644 --- a/glib/guniprop.c +++ b/glib/guniprop.c @@ -62,11 +62,6 @@ -#define ISDIGIT(Type) IS ((Type), \ - OR (G_UNICODE_DECIMAL_NUMBER, \ - OR (G_UNICODE_LETTER_NUMBER, \ - OR (G_UNICODE_OTHER_NUMBER, 0)))) - #define ISALPHA(Type) IS ((Type), \ OR (G_UNICODE_LOWERCASE_LETTER, \ OR (G_UNICODE_UPPERCASE_LETTER, \ @@ -337,7 +332,7 @@ g_unichar_isxdigit (gunichar c) { return ((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') - || ISDIGIT (TYPE (c))); + || (TYPE (c) == G_UNICODE_DECIMAL_NUMBER)); } /** -- 2.7.4