summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-03-28 01:32:30 +0100
committerThomas Deutschmann <whissi@gentoo.org>2019-03-28 01:33:05 +0100
commit5c55ece4eee17a954740b8ecc03b1cb8ed58c123 (patch)
tree2ea4e4d470d4a9e5e1c4b42319a5251d9f7082cb /sys-devel/patch/files/patch-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch
parentdev-cpp/gtest: ppc stable wrt bug #674354 (diff)
downloadgentoo-5c55ece4eee17a954740b8ecc03b1cb8ed58c123.tar.gz
gentoo-5c55ece4eee17a954740b8ecc03b1cb8ed58c123.tar.bz2
gentoo-5c55ece4eee17a954740b8ecc03b1cb8ed58c123.zip
sys-devel/patch: add patches for CVE-2018-{6951,6952}, CVE-2018-1000156
Bug: https://bugs.gentoo.org/647792 Bug: https://bugs.gentoo.org/647794 Bug: https://bugs.gentoo.org/652710 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'sys-devel/patch/files/patch-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch')
-rw-r--r--sys-devel/patch/files/patch-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/sys-devel/patch/files/patch-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch b/sys-devel/patch/files/patch-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch
new file mode 100644
index 000000000000..2d2863c0ccf6
--- /dev/null
+++ b/sys-devel/patch/files/patch-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch
@@ -0,0 +1,25 @@
+b5a91a01e5d0897facdd0f49d64b76b0f02b43e1
+
+Allow input files to be missing for ed-style patches
+* src/pch.c (do_ed_script): Allow input files to be missing so that new
+files will be created as with non-ed-style patches.
+
+diff --git a/src/pch.c b/src/pch.c
+index bc6278c..0c5cc26 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -2394,9 +2394,11 @@ do_ed_script (char const *inname, char const *outname,
+
+ if (! dry_run && ! skip_rest_of_patch) {
+ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
+- assert (! inerrno);
+- *outname_needs_removal = true;
+- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ if (inerrno != ENOENT)
++ {
++ *outname_needs_removal = true;
++ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
++ }
+ sprintf (buf, "%s %s%s", editor_program,
+ verbosity == VERBOSE ? "" : "- ",
+ outname);