mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
gdatetime: Track timezone length as an unsigned size_t
It’s guaranteed to be in (0, length] by the calculations above. This avoids the possibility of integer overflow through `gssize` not being as big as `size_t`. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
495c85278f
commit
5e8a3c19fc
@ -1398,7 +1398,8 @@ parse_iso8601_date (const gchar *text, gsize length,
|
||||
static GTimeZone *
|
||||
parse_iso8601_timezone (const gchar *text, gsize length, size_t *tz_offset)
|
||||
{
|
||||
gint i, tz_length, offset_hours, offset_minutes;
|
||||
size_t tz_length;
|
||||
gint i, offset_hours, offset_minutes;
|
||||
gint offset_sign = 1;
|
||||
GTimeZone *tz;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user