From e04263ca5cf7e83cfbf3cdea5f541c978295d93b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 1 Dec 2019 23:01:10 -0500 Subject: [PATCH] Fix a case of signed/unsigned confusion G_input_stream_read_finish returns a gssize, which we must not store in a gsize, since it may be -1. Closes: https://github.com/flatpak/flatpak/issues/2885 --- common/flatpak-utils-http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/flatpak-utils-http.c b/common/flatpak-utils-http.c index fde7be1e..b628c466 100644 --- a/common/flatpak-utils-http.c +++ b/common/flatpak-utils-http.c @@ -352,7 +352,7 @@ load_uri_read_cb (GObject *source, GAsyncResult *res, gpointer user_data) { LoadUriData *data = user_data; GInputStream *stream = G_INPUT_STREAM (source); - gsize nread; + gssize nread; nread = g_input_stream_read_finish (stream, res, &data->error); if (nread == -1 || nread == 0)