Avoid an array overrun. (Coverity, fix by Pascal Terjan)
[platform/upstream/glib.git] / glib / gdate.c
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;