Blame SOURCES/patch-2.7.6-CVE-2018-6951.patch

572a74
diff -up patch-2.7.6/src/pch.c.than patch-2.7.6/src/pch.c
572a74
--- patch-2.7.6/src/pch.c.than	2018-03-13 11:12:44.726307967 +0100
572a74
+++ patch-2.7.6/src/pch.c	2018-03-13 11:13:34.203449789 +0100
572a74
@@ -976,7 +976,8 @@ intuit_diff_type (bool need_header, mode
572a74
     if ((pch_rename () || pch_copy ())
572a74
 	&& ! inname
572a74
 	&& ! ((i == OLD || i == NEW) &&
572a74
-	      p_name[! reverse] &&
572a74
+	      p_name[reverse] && p_name[! reverse] &&
572a74
+	      name_is_valid (p_name[reverse]) &&
572a74
 	      name_is_valid (p_name[! reverse])))
572a74
       {
572a74
 	say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy");