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
This commit is contained in:
Matthias Clasen
2019-12-01 23:01:10 -05:00
parent a0dbb9edc9
commit e04263ca5c

View File

@@ -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)