aboutsummaryrefslogtreecommitdiff
path: root/bin/rdsquashfs/test
diff options
context:
space:
mode:
Diffstat (limited to 'bin/rdsquashfs/test')
-rw-r--r--bin/rdsquashfs/test/pathtraversal.sh.in12
-rw-r--r--bin/rdsquashfs/test/pathtraversal.sqfsbin0 -> 4096 bytes
2 files changed, 12 insertions, 0 deletions
diff --git a/bin/rdsquashfs/test/pathtraversal.sh.in b/bin/rdsquashfs/test/pathtraversal.sh.in
new file mode 100644
index 0000000..5b19c4d
--- /dev/null
+++ b/bin/rdsquashfs/test/pathtraversal.sh.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+RDSQFS="@abs_top_builddir@/rdsquashfs"
+REFFILE="@abs_top_srcdir@/bin/rdsquashfs/test/pathtraversal.sqfs"
+GOTCHA="/tmp/gotcha.txt"
+
+if "$RDSQFS" -u / -p . "$REFFILE"; then
+ if [ -e "$GOTCHA" ]; then
+ echo "Found $GOTCHA which should not be there"
+ exit 1
+ fi
+fi
diff --git a/bin/rdsquashfs/test/pathtraversal.sqfs b/bin/rdsquashfs/test/pathtraversal.sqfs
new file mode 100644
index 0000000..0c33bb3
--- /dev/null
+++ b/bin/rdsquashfs/test/pathtraversal.sqfs
Binary files differ