Merge branch 'coverity-datetime' into 'master'

gdatetime: Widen a variable before multiplication

See merge request GNOME/glib!1622
This commit is contained in:
Philip Withnall 2020-08-18 09:49:15 +00:00
commit ab700f9c58

View File

@ -598,7 +598,7 @@ ymd_to_days (gint year,
{
gint64 days;
days = (year - 1) * 365 + ((year - 1) / 4) - ((year - 1) / 100)
days = ((gint64) year - 1) * 365 + ((year - 1) / 4) - ((year - 1) / 100)
+ ((year - 1) / 400);
days += days_in_year[0][month - 1];