[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.2.2, Sat Oct 20 16:12:15 2018 UTC (5 years, 5 months ago) by spz
Branch: pkgsrc-2018Q3
Changes since 1.1.2.1: +48 -0 lines

Pullup ticket #5847 - requested by bsiegert
devel/patch: security patches

Revisions pulled up:
- devel/patch/Makefile                                          1.45
- devel/patch/distinfo                                          1.13
- devel/patch/patches/patch-src_pch.c                           1.1
- devel/patch/patches/patch-tests_Makefile.in                   1.1
- devel/patch/patches/patch-tests_ed-style                      1.1

-------------------------------------------------------------------
   Module Name:    pkgsrc
   Committed By:   leot
   Date:           Thu Oct 18 19:26:16 UTC 2018

   Modified Files:
           pkgsrc/devel/patch: Makefile distinfo
   Added Files:
           pkgsrc/devel/patch/patches: patch-src_pch.c patch-tests_Makefile.in
               patch-tests_ed-style

   Log Message:
   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


   To generate a diff of this commit:
   cvs rdiff -u -r1.44 -r1.45 pkgsrc/devel/patch/Makefile
   cvs rdiff -u -r1.12 -r1.13 pkgsrc/devel/patch/distinfo
   cvs rdiff -u -r0 -r1.1 pkgsrc/devel/patch/patches/patch-src_pch.c \
       pkgsrc/devel/patch/patches/patch-tests_Makefile.in \
       pkgsrc/devel/patch/patches/patch-tests_ed-style

$NetBSD: patch-tests_ed-style,v 1.1.2.2 2018/10/20 16:12:15 spz 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