aboutsummaryrefslogtreecommitdiff
path: root/mail/lib
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2007-11-27 15:39:06 -0500
committerRuss Cox <rsc@swtch.com>2007-11-27 15:39:06 -0500
commit83ab7d88962d717ca5729e7337706b6e4da48af6 (patch)
tree2dcaeba8fec383733357f4db5e9c2d0718767838 /mail/lib
parent00a8743cd85fcb605a06382387ac526e7fe8bf36 (diff)
parent00a8743cd85fcb605a06382387ac526e7fe8bf36 (diff)
downloadplan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.tar.gz
plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.tar.bz2
plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.zip
merge
Diffstat (limited to 'mail/lib')
-rwxr-xr-xmail/lib/validateattachment4
1 files changed, 4 insertions, 0 deletions
diff --git a/mail/lib/validateattachment b/mail/lib/validateattachment
index d21044f3..74018d0e 100755
--- a/mail/lib/validateattachment
+++ b/mail/lib/validateattachment
@@ -54,6 +54,10 @@ case *'zip archive'*
# but the errors look like
# unzip: reading data for philw.doc.scr failed: ...
# so we can still catch these.
+ if(! unzip -tsf $file >[2=1] >/dev/null){
+ echo corrupt zip file!
+ exit $discard
+ }
if(unzip -tsf $file >[2=1] | grep -si ' |\.(scr|exe|pif|bat|com)$'){
echo executables inside zip file!
exit $discard