From 31875aa6fa281bd95eb084b009a633d3f988f0f4 Mon Sep 17 00:00:00 2001 From: Packit Date: Sep 14 2020 12:30:32 +0000 Subject: Apply patch libgxps-0.3.0-archive-handle-error.patch patch_name: libgxps-0.3.0-archive-handle-error.patch present_in_specfile: true location_in_specfile: 2 --- diff --git a/libgxps/gxps-archive.c b/libgxps/gxps-archive.c index 346ba73..1bae729 100644 --- a/libgxps/gxps-archive.c +++ b/libgxps/gxps-archive.c @@ -520,6 +520,13 @@ gxps_archive_input_stream_read (GInputStream *stream, return -1; bytes_read = archive_read_data (istream->zip->archive, buffer, count); + if (bytes_read < 0) { + g_set_error_literal (error, + G_IO_ERROR, + g_io_error_from_errno (archive_errno (istream->zip->archive)), + archive_error_string (istream->zip->archive)); + return -1; + } if (bytes_read == 0 && istream->is_interleaved && !gxps_archive_input_stream_is_last_piece (istream)) { /* Read next piece */ gxps_archive_input_stream_next_piece (istream);