Merge branch 'ossfuzz-9815-time-signed-arithmetic' into 'master'

gtimer: Ensure arithmetic is correctly signed for ISO 8601 parsing

See merge request GNOME/glib!240
This commit is contained in:
Xavier Claessens 2018-08-10 13:35:36 +00:00
commit cce309aebb

View File

@ -497,7 +497,7 @@ g_time_val_from_iso8601 (const gchar *iso_date,
if (min > 59) if (min > 59)
return FALSE; return FALSE;
time_->tv_sec = mktime_utc (&tm) + (time_t) (60 * (60 * hour + min) * sign); time_->tv_sec = mktime_utc (&tm) + (time_t) (60 * (gint64) (60 * hour + min) * sign);
} }
else else
{ {