From 8f6738b925009bd957516f03cafa6d2dd572391d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 16 Apr 2006 05:19:26 +0000 Subject: [PATCH] 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) --- ChangeLog | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ glib/gdate.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) 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; -- 2.34.1