[freeside-commits] branch master updated. d88573ffdbf81830da692c49461664fc076f855d
Mark Wells
mark at 420.am
Mon Jun 9 16:37:37 PDT 2014
The branch, master has been updated
via d88573ffdbf81830da692c49461664fc076f855d (commit)
from a455b3d4dd10624e223705477f55ef09ed81a85f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d88573ffdbf81830da692c49461664fc076f855d
Author: Mark Wells <mark at freeside.biz>
Date: Mon Jun 9 16:36:59 2014 -0700
fix checking of address range bounds, #29514, fallout from #26868
diff --git a/httemplate/edit/process/addr_range.html b/httemplate/edit/process/addr_range.html
index 5df0559..c236a73 100644
--- a/httemplate/edit/process/addr_range.html
+++ b/httemplate/edit/process/addr_range.html
@@ -13,10 +13,13 @@
$cgi->param('end', $end->addr);
$cgi->param('start', $start->addr);
}
- if ( $start + 0x7FFFFFFF <= $end ) {
+ # detect addr ranges that are too big
+ my ($one) = split('\.', $start->addr);
+ if ( $one < 128 and $start + 0x7FFFFFFF <= $end ) {
# then this is going to overflow
- return "Address ranges must be < 2^31 - 1 addresses long."
- }
+ return "Address ranges must be < 2^31 - 1 addresses long.";
+ } # if the first octet is >= 128, then it's in the top half of
+ # address space and it CAN'T be too big
$cgi->param('length', $end - $start + 1);
} else {
-----------------------------------------------------------------------
Summary of changes:
httemplate/edit/process/addr_range.html | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list