From: Matthias Clasen Date: Sun, 16 Apr 2006 05:19:26 +0000 (+0000) Subject: Avoid an array overrun. (Coverity, fix by Pascal Terjan) X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=8f6738b925009bd957516f03cafa6d2dd572391d;p=dana%2Fcg-glib.git Avoid an array overrun. (Coverity, fix by Pascal Terjan) 2006-04-16 Matthias Clasen * glib/gdate.c (g_date_fill_parse_tokens): Avoid an array overrun. (Coverity, fix by Pascal Terjan) --- diff --git a/ChangeLog b/ChangeLog index d37ee5b0..ed26ef7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-16 Matthias Clasen + + * glib/gdate.c (g_date_fill_parse_tokens): Avoid an array + overrun. (Coverity, fix by Pascal Terjan) + 2006-04-12 Bastien Nocera reviewed by: Matthias Clasen diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index d37ee5b0..ed26ef7a 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2006-04-16 Matthias Clasen + + * glib/gdate.c (g_date_fill_parse_tokens): Avoid an array + overrun. (Coverity, fix by Pascal Terjan) + 2006-04-12 Bastien Nocera reviewed by: Matthias Clasen diff --git a/glib/gdate.c b/glib/gdate.c index 0b3e86e2..a00b34f4 100644 --- a/glib/gdate.c +++ b/glib/gdate.c @@ -513,7 +513,7 @@ g_date_fill_parse_tokens (const gchar *str, GDateParseTokens *pt) { i = 0; - while (*s && g_ascii_isdigit (*s) && i <= NUM_LEN) + while (*s && g_ascii_isdigit (*s) && i < NUM_LEN) { num[pt->num_ints][i] = *s; ++s;