From cdcd860f9cc936ba500ad54bfa3e5fa337dd5a3b Mon Sep 17 00:00:00 2001 From: NewEraCracker Date: Fri, 12 Feb 2016 09:23:28 +0000 Subject: Add check of IPv4 only IPs on IPv6 SplitV64 Will prevent access to wrong string offset --- src/etc/inc/IPv6.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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); -- cgit v1.1