+Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
+
+ * glib/gstrfuncs.c: Fixed a bad pointer comparison in
+ g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
+ Esfahbod).
+
+ * tests/strtod-test.c: Fixed the tests to catch the above.
+
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
+Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
+
+ * glib/gstrfuncs.c: Fixed a bad pointer comparison in
+ g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
+ Esfahbod).
+
+ * tests/strtod-test.c: Fixed the tests to catch the above.
+
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
+Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
+
+ * glib/gstrfuncs.c: Fixed a bad pointer comparison in
+ g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
+ Esfahbod).
+
+ * tests/strtod-test.c: Fixed the tests to catch the above.
+
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
+Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
+
+ * glib/gstrfuncs.c: Fixed a bad pointer comparison in
+ g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
+ Esfahbod).
+
+ * tests/strtod-test.c: Fixed the tests to catch the above.
+
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
+Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
+
+ * glib/gstrfuncs.c: Fixed a bad pointer comparison in
+ g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
+ Esfahbod).
+
+ * tests/strtod-test.c: Fixed the tests to catch the above.
+
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
+Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
+
+ * glib/gstrfuncs.c: Fixed a bad pointer comparison in
+ g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
+ Esfahbod).
+
+ * tests/strtod-test.c: Fixed the tests to catch the above.
+
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
if (fail_pos)
{
- if (fail_pos > decimal_point_pos)
+ if (fail_pos - copy > decimal_point_pos - nptr)
fail_pos = (char *)nptr + (fail_pos - copy) - (decimal_point_len - 1);
else
fail_pos = (char *)nptr + (fail_pos - copy);
char *locales[] = {"sv_SE", "en_US", "fa_IR", "C"};
int l;
char *end;
+ char *dummy;
+
+ /* we try a copy of number, with some free space for malloc before that.
+ * This is supposed to smash the some wrong pointer calculations. */
+
+ dummy = g_malloc (100000);
+ number = g_strdup (number);
+ g_free (dummy);
for (l = 0; l < G_N_ELEMENTS (locales); l++)
{
d = g_ascii_strtod (number, &end);
if (d != res)
g_print ("g_ascii_strtod for locale %s failed\n", locales[l]);
- if (*end != 0)
+ if (end - number != strlen(number))
g_print ("g_ascii_strtod for locale %s endptr was wrong\n", locales[l]);
}
+
+ g_free (number);
}