mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +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:
		@@ -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;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user