summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/IPv6.inc
diff options
context:
space:
mode:
authorNewEraCracker <neweracracker@gmail.com>2016-02-12 09:23:28 +0000
committerNewEraCracker <neweracracker@gmail.com>2016-02-12 09:23:28 +0000
commitcdcd860f9cc936ba500ad54bfa3e5fa337dd5a3b (patch)
tree7c89ab3e02e4430d832962b280c5d4149a50be7c /src/etc/inc/IPv6.inc
parentcc293ac0f602ab60ede5be5a6d931362789e4c3c (diff)
downloadpfsense-cdcd860f9cc936ba500ad54bfa3e5fa337dd5a3b.zip
pfsense-cdcd860f9cc936ba500ad54bfa3e5fa337dd5a3b.tar.gz
Add check of IPv4 only IPs on IPv6 SplitV64
Will prevent access to wrong string offset
Diffstat (limited to 'src/etc/inc/IPv6.inc')
-rw-r--r--src/etc/inc/IPv6.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/etc/inc/IPv6.inc b/src/etc/inc/IPv6.inc
index c3aa3f6..4493273 100644
--- a/src/etc/inc/IPv6.inc
+++ b/src/etc/inc/IPv6.inc
@@ -843,6 +843,11 @@ class Net_IPv6
if (strstr($ip, '.')) {
$pos = strrpos($ip, ':');
+
+ if(false === $pos) {
+ return array("", $ip);
+ }
+
$ip{$pos} = '_';
$ipPart = explode('_', $ip);
OpenPOWER on IntegriCloud