Avoid an array overrun. (Coverity, fix by Pascal Terjan)

2006-04-16  Matthias Clasen  <mclasen@redhat.com>

        * glib/gdate.c (g_date_fill_parse_tokens): Avoid an array
        overrun.  (Coverity, fix by Pascal Terjan)
This commit is contained in:
Matthias Clasen 2006-04-16 05:19:26 +00:00 committed by Matthias Clasen
parent 486c42ba75
commit 8f6738b925
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-04-16 Matthias Clasen <mclasen@redhat.com>
* glib/gdate.c (g_date_fill_parse_tokens): Avoid an array
overrun. (Coverity, fix by Pascal Terjan)
2006-04-12 Bastien Nocera <hadess@hadess.net>
reviewed by: Matthias Clasen <mclasen@redhat.com>

View File

@ -1,3 +1,8 @@
2006-04-16 Matthias Clasen <mclasen@redhat.com>
* glib/gdate.c (g_date_fill_parse_tokens): Avoid an array
overrun. (Coverity, fix by Pascal Terjan)
2006-04-12 Bastien Nocera <hadess@hadess.net>
reviewed by: Matthias Clasen <mclasen@redhat.com>

View File

@ -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;