summaryrefslogtreecommitdiffstats
path: root/scripts/t/Dpkg_Source_Patch
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/t/Dpkg_Source_Patch')
-rw-r--r--scripts/t/Dpkg_Source_Patch/c-style.patch4
-rw-r--r--scripts/t/Dpkg_Source_Patch/ghost-hunk.patch7
-rw-r--r--scripts/t/Dpkg_Source_Patch/indent-header.patch9
-rw-r--r--scripts/t/Dpkg_Source_Patch/index-+++.patch4
-rw-r--r--scripts/t/Dpkg_Source_Patch/index-alone.patch3
-rw-r--r--scripts/t/Dpkg_Source_Patch/index-inert.patch8
-rw-r--r--scripts/t/Dpkg_Source_Patch/partial.patch3
7 files changed, 38 insertions, 0 deletions
diff --git a/scripts/t/Dpkg_Source_Patch/c-style.patch b/scripts/t/Dpkg_Source_Patch/c-style.patch
new file mode 100644
index 0000000..290a640
--- /dev/null
+++ b/scripts/t/Dpkg_Source_Patch/c-style.patch
@@ -0,0 +1,4 @@
+--- /dev/null
++++ "b/\tmp/c-style"
+@@ -0,0 +1 @@
++Escaped
diff --git a/scripts/t/Dpkg_Source_Patch/ghost-hunk.patch b/scripts/t/Dpkg_Source_Patch/ghost-hunk.patch
new file mode 100644
index 0000000..32c3efe
--- /dev/null
+++ b/scripts/t/Dpkg_Source_Patch/ghost-hunk.patch
@@ -0,0 +1,7 @@
+--- a/disable/partial-file
++++ b/disable/partial-file
+@@ -0,0 +1,1 @@disable
++++ b/symlink/hunk-file
+--- a/symlink/hunk-file
+@@ -0,0 +1,1 @@
++Escaped
diff --git a/scripts/t/Dpkg_Source_Patch/indent-header.patch b/scripts/t/Dpkg_Source_Patch/indent-header.patch
new file mode 100644
index 0000000..4bef008
--- /dev/null
+++ b/scripts/t/Dpkg_Source_Patch/indent-header.patch
@@ -0,0 +1,9 @@
+ --- /dev/null
+ +++ b/symlink/index-file
+ @@ -0,0 +1,1 @@
+ +Escaped
+
+--- /dev/null
++++ b/dummy-file
+@@ -0,0 +1,1 @@
++Dummy to make the code see a valid hunk
diff --git a/scripts/t/Dpkg_Source_Patch/index-+++.patch b/scripts/t/Dpkg_Source_Patch/index-+++.patch
new file mode 100644
index 0000000..4ebc23e
--- /dev/null
+++ b/scripts/t/Dpkg_Source_Patch/index-+++.patch
@@ -0,0 +1,4 @@
+Index: index/symlink/index-file
++++
+@@ -0,0 +1,1 @@
++Escaped
diff --git a/scripts/t/Dpkg_Source_Patch/index-alone.patch b/scripts/t/Dpkg_Source_Patch/index-alone.patch
new file mode 100644
index 0000000..904d3d1
--- /dev/null
+++ b/scripts/t/Dpkg_Source_Patch/index-alone.patch
@@ -0,0 +1,3 @@
+Index: index/symlink/index-file
+@@ -0,0 +1,1 @@
++Escaped
diff --git a/scripts/t/Dpkg_Source_Patch/index-inert.patch b/scripts/t/Dpkg_Source_Patch/index-inert.patch
new file mode 100644
index 0000000..5d16c7d
--- /dev/null
+++ b/scripts/t/Dpkg_Source_Patch/index-inert.patch
@@ -0,0 +1,8 @@
+This could be a comment about the patch itself, where we could use an
+Index: a/ header with /../ inside that could be interpreted as a
+malicious pseudo-header, so we should not validate it,
+
+--- /dev/null
++++ b/inert-file
+@@ -0,0 +1,1 @@
++Inert
diff --git a/scripts/t/Dpkg_Source_Patch/partial.patch b/scripts/t/Dpkg_Source_Patch/partial.patch
new file mode 100644
index 0000000..0878858
--- /dev/null
+++ b/scripts/t/Dpkg_Source_Patch/partial.patch
@@ -0,0 +1,3 @@
++++ b/symlink/partial-file
+@@ -0,0 +1,1 @@
++Escaped