Avoid an array overrun. (Coverity, fix by Pascal Terjan)
authorMatthias Clasen <mclasen@redhat.com>
Sun, 16 Apr 2006 05:19:26 +0000 (05:19 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 16 Apr 2006 05:19:26 +0000 (05:19 +0000)
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)

ChangeLog
ChangeLog.pre-2-12
glib/gdate.c

index d37ee5b..ed26ef7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
index d37ee5b..ed26ef7 100644 (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>
index 0b3e86e..a00b34f 100644 (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;