]> hydra-www.ietfng.org Git - instirc/commitdiff
Increase paranoia of MasterCoder's ldecode
authornwf <nwf@cs.jhu.edu>
Wed, 27 Aug 2008 06:38:20 +0000 (02:38 -0400)
committernwf <nwf@cs.jhu.edu>
Wed, 27 Aug 2008 06:38:20 +0000 (02:38 -0400)
darcs-hash:20080827063820-4d648-00864728032f17885f07644b235bd8dcc5359ace.gz

MasterCoder.pm

index 51f987b9c1d00ce977aeaa397952e60c0e12053b..de57c0997f21a5feb879f652244a0e48ec495308 100644 (file)
@@ -98,6 +98,8 @@ sub ldecode($$) {
 
     die "Can't decode numbers that big!" if $reallen >= $ccc - 1;
 
+    return (undef, undef) if length $in < $reallen;
+
     my $encval = substr($in, 1, $reallen);
 
     my $realval = $self->tdecode($encval);