From: Owen Taylor Date: Wed, 2 May 2001 15:19:55 +0000 (+0000) Subject: Fix read past end of the string. (#50404, fix from Jonas Borgström) X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=d4e0ae748ac3b123e0aff97f965bfffbe4046a3b;p=dana%2Fcg-glib.git Fix read past end of the string. (#50404, fix from Jonas Borgström) Wed May 2 11:10:22 2001 Owen Taylor * gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string. (#50404, fix from Jonas Borgström) --- diff --git a/ChangeLog b/ChangeLog index e5567581..f12a6e69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed May 2 11:10:22 2001 Owen Taylor + + * gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string. + (#50404, fix from Jonas Borgström) + Sun Apr 29 00:37:34 2001 Tim Janik * ghook.[hc]: made hook ids a gulong. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index e5567581..f12a6e69 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Wed May 2 11:10:22 2001 Owen Taylor + + * gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string. + (#50404, fix from Jonas Borgström) + Sun Apr 29 00:37:34 2001 Tim Janik * ghook.[hc]: made hook ids a gulong. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e5567581..f12a6e69 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Wed May 2 11:10:22 2001 Owen Taylor + + * gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string. + (#50404, fix from Jonas Borgström) + Sun Apr 29 00:37:34 2001 Tim Janik * ghook.[hc]: made hook ids a gulong. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index e5567581..f12a6e69 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +Wed May 2 11:10:22 2001 Owen Taylor + + * gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string. + (#50404, fix from Jonas Borgström) + Sun Apr 29 00:37:34 2001 Tim Janik * ghook.[hc]: made hook ids a gulong. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index e5567581..f12a6e69 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Wed May 2 11:10:22 2001 Owen Taylor + + * gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string. + (#50404, fix from Jonas Borgström) + Sun Apr 29 00:37:34 2001 Tim Janik * ghook.[hc]: made hook ids a gulong. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index e5567581..f12a6e69 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Wed May 2 11:10:22 2001 Owen Taylor + + * gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string. + (#50404, fix from Jonas Borgström) + Sun Apr 29 00:37:34 2001 Tim Janik * ghook.[hc]: made hook ids a gulong. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index e5567581..f12a6e69 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Wed May 2 11:10:22 2001 Owen Taylor + + * gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string. + (#50404, fix from Jonas Borgström) + Sun Apr 29 00:37:34 2001 Tim Janik * ghook.[hc]: made hook ids a gulong. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e5567581..f12a6e69 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Wed May 2 11:10:22 2001 Owen Taylor + + * gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string. + (#50404, fix from Jonas Borgström) + Sun Apr 29 00:37:34 2001 Tim Janik * ghook.[hc]: made hook ids a gulong. diff --git a/glib/gutf8.c b/glib/gutf8.c index 1e112389..541b1826 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -660,7 +660,7 @@ g_utf8_to_ucs4_fast (const gchar *str, } else { - while (*p && p < str + len) + while (p < str + len && *p) { p = g_utf8_next_char (p); ++n_chars; diff --git a/gutf8.c b/gutf8.c index 1e112389..541b1826 100644 --- a/gutf8.c +++ b/gutf8.c @@ -660,7 +660,7 @@ g_utf8_to_ucs4_fast (const gchar *str, } else { - while (*p && p < str + len) + while (p < str + len && *p) { p = g_utf8_next_char (p); ++n_chars;