Avoid a possible array overrun. (Coverity)

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

        * gtk/gtkcalendar.c (gtk_calendar_key_press): Avoid a
        possible array overrun.  (Coverity)
This commit is contained in:
Matthias Clasen 2006-04-16 05:01:46 +00:00 committed by Matthias Clasen
parent 2f24913cb5
commit d121da8531

View File

@ -2832,12 +2832,12 @@ gtk_calendar_key_press (GtkWidget *widget,
case GDK_space:
row = calendar->focus_row;
col = calendar->focus_col;
day = calendar->day[row][col];
if (row > -1 && col > -1)
{
return_val = TRUE;
day = calendar->day[row][col];
if (calendar->day_month[row][col] == MONTH_PREV)
calendar_set_month_prev (calendar);
else if (calendar->day_month[row][col] == MONTH_NEXT)