mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-13 21:06:17 +01:00
gtimer: Ensure arithmetic is correctly signed for ISO 8601 parsing
When calculating the value of a timezone offset, ensure that any offsets done with negative numbers are done in a signed integer. oss-fuzz#9815 Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
0d271223d8
commit
8c844291b7
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user