* sbr/m_getfld.c: fix two bugs which could cause us to walk off
[mmh] / test / tests / inc / test-deb359167
diff --git a/test/tests/inc/test-deb359167 b/test/tests/inc/test-deb359167
new file mode 100644 (file)
index 0000000..61d3283
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Test a variant of a mailbox which caused debian bug 359167.
+set -e
+
+. common.sh
+
+THISDIR="tests/inc"
+
+require_prog valgrind
+
+TESTMBOX="$THISDIR/deb359167.mbox"
+
+if [ "$(md5sum "$TESTMBOX" | cut -d ' ' -f 1)" != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then 
+  echo "Test mailbox has been corrupted"
+  exit 1
+fi
+
+valgrind --error-exitcode=1 --quiet inc -silent -file "$TESTMBOX"