summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-04-07 22:14:58 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-04-07 22:48:48 +0200
commit0bdae1a3845db5572b948a1f8a2cfb3d31b042ef (patch)
treec55d5018c9d107671fe82d80fe41ad79afc016ff /dev-libs/libcdio/files/libcdio-2.0.0-iso-ioleak.patch
parentsci-libs/chemkit: Fix HOMEPAGE, chemkit.org dead for some time (diff)
downloadgentoo-0bdae1a3845db5572b948a1f8a2cfb3d31b042ef.tar.gz
gentoo-0bdae1a3845db5572b948a1f8a2cfb3d31b042ef.tar.bz2
gentoo-0bdae1a3845db5572b948a1f8a2cfb3d31b042ef.zip
dev-libs/libcdio: Fix I/O leak w/ unreadable ISO file
DOCS to array, drop ltprune for find. Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'dev-libs/libcdio/files/libcdio-2.0.0-iso-ioleak.patch')
-rw-r--r--dev-libs/libcdio/files/libcdio-2.0.0-iso-ioleak.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/dev-libs/libcdio/files/libcdio-2.0.0-iso-ioleak.patch b/dev-libs/libcdio/files/libcdio-2.0.0-iso-ioleak.patch
new file mode 100644
index 000000000000..17732104c3d1
--- /dev/null
+++ b/dev-libs/libcdio/files/libcdio-2.0.0-iso-ioleak.patch
@@ -0,0 +1,37 @@
+From 8c0de2d3f0324ecf3fd135589589dcd783c15556 Mon Sep 17 00:00:00 2001
+From: rocky <rocky@gnu.org>
+Date: Fri, 16 Feb 2018 09:14:17 -0500
+Subject: Fix small I/O leak when we can't read ISO file
+
+See Savannah bug #53170. Thanks to David Binderman.
+---
+ src/iso-read.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/iso-read.c b/src/iso-read.c
+index 0541e27..8647485 100644
+--- a/src/iso-read.c
++++ b/src/iso-read.c
+@@ -1,5 +1,6 @@
+ /*
+- Copyright (C) 2004-2006, 2008, 2012-2013, 2017 Rocky Bernstein <rocky@gnu.org>
++ Copyright (C) 2004-2006, 2008, 2012-2013, 2017-2018 Rocky Bernstein
++ <rocky@gnu.org>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -364,7 +365,10 @@ main(int argc, char *argv[])
+ ret = read_iso_file (opts.iso9660_image, opts.file_name,
+ outfd, &bytes_written);
+ }
+- if (ret != 0) return ret;
++ if (ret != 0) {
++ fclose (outfd);
++ return ret;
++ }
+
+ fflush (outfd);
+
+--
+cgit v1.0-41-gc330
+