diff --git a/glib/gdate.c b/glib/gdate.c index 59a85c4f6..5feb090c4 100644 --- a/glib/gdate.c +++ b/glib/gdate.c @@ -2588,7 +2588,8 @@ win32_strftime_helper (const GDate *d, return 0; } - if (slen <= convlen) + g_assert (convlen >= 0); + if ((gsize) convlen >= slen) { /* Ensure only whole characters are copied into the buffer. */ gchar *end = g_utf8_find_prev_char (convbuf, convbuf + slen);