vfs,avfs: verify an interpreter was found on #! line

. if not, NULL *interp is dereferenced
This commit is contained in:
Ben Gras
2011-12-21 23:44:13 +01:00
parent 3fb6c995e0
commit 34a8901eb8
4 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ tests=" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
41 42 43 44 45 45-gcc 46 47 48 49 49-gcc 50 \
51 51-gcc 52 52-gcc 53 54 55 56 57 58 59\
60 61 \
sh1.sh sh2.sh"
sh1.sh sh2.sh interp.sh"
tests_no=`expr 0`
# Directory must be owned by bin
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
# See if the system can handle an unexpected whitespace-only interpreter line
echo -n "Test interpreter "
set -e
TMPSH=tst$$.sh
rm -f $TMPSH
echo '#! ' >$TMPSH
chmod 755 $TMPSH
./$TMPSH || true
rm -f $TMPSH
echo "ok"