summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authortmu <tmu>2003-06-06 10:26:15 +0000
committertmu <tmu>2003-06-06 10:26:15 +0000
commitc318fced594f074c82c318809b4522b6d035dee4 (patch)
tree966d21756d205d132abb5cae1fd05100a3c9d8b6 /fml/lib
parente661b150f3151efac8c516073bc1c25bda579182 (diff)
downloadfml8-c318fced594f074c82c318809b4522b6d035dee4.tar.gz
fml8-c318fced594f074c82c318809b4522b6d035dee4.tar.bz2
fml8-c318fced594f074c82c318809b4522b6d035dee4.zip
against longloop for underrun and overrun
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/Mail/Message/MH.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/fml/lib/Mail/Message/MH.pm b/fml/lib/Mail/Message/MH.pm
index efd5ab4b..a4cb3f82 100644
--- a/fml/lib/Mail/Message/MH.pm
+++ b/fml/lib/Mail/Message/MH.pm
@@ -2,7 +2,7 @@
#
# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi
#
-# $FML: MH.pm,v 1.12 2003/01/11 15:16:35 fukachan Exp $
+# $FML: MH.pm,v 1.13 2003/01/26 03:23:10 fukachan Exp $
#
package Mail::Message::MH;
@@ -78,15 +78,19 @@ sub expand
}
elsif ($str =~ /^(\d+)\-(\d+)$/) {
my ($first, $last) = ($1, $2);
+ $first = $min if($first < $min);
+ $last = $max if($last > $max);
return _expand_range($first, $last);
}
elsif ($str =~ /^(first)\-(\d+)$/) {
my ($first, $last) = ($1, $2);
+ $last = $max if($last > $max);
return _expand_range($min, $last);
}
elsif ($str =~ /^(\d+)\-(last)$/) {
unless (defined $max) { return undef;}
my ($first, $last) = ($1, $2);
+ $first = $min if($first < $min);
return _expand_range($first, $max);
}
elsif ($str eq 'first') {