[BACK]Return to patch-tests_ed-style CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / patch / patches

File: [cvs.NetBSD.org] / pkgsrc / devel / patch / patches / patch-tests_ed-style (download)

Revision 1.1, Thu Oct 18 19:26:16 2018 UTC (4 years, 3 months ago) by leot
Branch: MAIN
CVS Tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, HEAD
Branch point for: pkgsrc-2018Q3

patch: Backport patches for several security fixes

pkgsrc changes:
 - Remove custom and no longer needed do-patch target, it was fixed upstream
 - Minor cosmetic improvements pointed out by pkglint

Changes:
 - Backport patches for CVE-2018-6951, CVE-2018-6952 and CVE-2018-1000156

Patch provided by Attila Fülöp via NetBSD/pkgsrc#33, thanks!

Bump PKGREVISION

$NetBSD: patch-tests_ed-style,v 1.1 2018/10/18 19:26:16 leot Exp $

 - Add ed-style test, related to CVE-2018-1000156 fix.

--- tests/ed-style.orig	2018-10-09 17:51:47.148455875 +0000
+++ tests/ed-style
@@ -0,0 +1,41 @@
+# Copyright (C) 2018 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# in any medium, are permitted without royalty provided the copyright
+# notice and this notice are preserved.
+
+. $srcdir/test-lib.sh
+
+require cat
+use_local_patch
+use_tmpdir
+
+# ==============================================================
+
+cat > ed1.diff <<EOF
+0a
+foo
+.
+EOF
+
+check 'patch -e foo -i ed1.diff' <<EOF
+EOF
+
+check 'cat foo' <<EOF
+foo
+EOF
+
+cat > ed2.diff <<EOF
+1337a
+r !echo bar
+,p
+EOF
+
+check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF
+?
+Status: 2
+EOF
+
+check 'cat foo' <<EOF
+foo
+EOF