]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Check that mktemp result is a directory
authorSebastian Hahn <sebastian@torproject.org>
Sat, 7 Feb 2015 13:48:06 +0000 (14:48 +0100)
committerNick Mathewson <nickm@torproject.org>
Wed, 11 Feb 2015 20:59:34 +0000 (15:59 -0500)
Fixes part of bug #14478, patch idea suggested by an anonymous
contributor. Thanks!

src/test/zero_length_keys.sh

index 7c99564f1a15a88f439ef4d66b23ff6c3adb2a80..0dd67c1780f6cdadf2846282860e51560debc65a 100755 (executable)
@@ -30,6 +30,10 @@ if [ -z "$DATA_DIR" ]; then
   echo "Failure: mktemp invocation returned empty string"
   exit 255
 fi
+if [ -d "$DATA_DIR" ]; then
+  echo "Failure: mktemp invocation result doesn't point to directory"
+  exit 255
+fi
 trap "rm -rf '$DATA_DIR'" 0
 
 # DisableNetwork means that the ORPort won't actually be opened.