mirror of
https://github.com/flatpak/flatpak.git
synced 2026-06-02 13:26:14 -04:00
dir/http: Use gint64 for g_ascii_strtoll return values
g_ascii_strtoll returns gint64; storing the result in a narrower type (int, gint) silently truncates large values.
This commit is contained in:
@@ -1920,7 +1920,7 @@ append_locations_from_config_file (GPtrArray *locations,
|
||||
g_autofree char *display_name = NULL;
|
||||
g_autofree char *priority = NULL;
|
||||
g_autofree char *storage_type = NULL;
|
||||
gint priority_val = 0;
|
||||
gint64 priority_val = 0;
|
||||
|
||||
display_name = g_key_file_get_string (keyfile, groups[i], "DisplayName", NULL);
|
||||
priority = g_key_file_get_string (keyfile, groups[i], "Priority", NULL);
|
||||
|
||||
@@ -1184,7 +1184,7 @@ set_cache_http_data_from_headers (CacheHttpData *cache_data,
|
||||
char *end;
|
||||
|
||||
char *max_age = value;
|
||||
int max_age_sec = g_ascii_strtoll (max_age, &end, 10);
|
||||
gint64 max_age_sec = g_ascii_strtoll (max_age, &end, 10);
|
||||
if (*max_age != '\0' && *end == '\0')
|
||||
{
|
||||
GTimeVal now;
|
||||
|
||||
Reference in New Issue
Block a user