projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0fb4ab2
)
fix checking of address range bounds, #29514, fallout from #26868
author
Mark Wells
<mark@freeside.biz>
Mon, 9 Jun 2014 23:37:30 +0000
(16:37 -0700)
committer
Mark Wells
<mark@freeside.biz>
Mon, 9 Jun 2014 23:37:30 +0000
(16:37 -0700)
httemplate/edit/process/addr_range.html
patch
|
blob
|
history
diff --git
a/httemplate/edit/process/addr_range.html
b/httemplate/edit/process/addr_range.html
index
5df0559
..
c236a73
100644
(file)
--- 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);
}
$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
# 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 {
$cgi->param('length', $end - $start + 1);
} else {