summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2014-09-02 09:39:52 +0200
committerYorhel <git@yorhel.nl>2014-09-02 09:39:52 +0200
commitdba05205869dd203624df9866eb17640e0d630ec (patch)
treef0a17b84cf6fd6e6f3b57caf93fb7e85a0b7ef32
parent67703e7c3f56e6ef4bb94a9157159803632bc087 (diff)
Fix matching bug in norm_ip()
The . match doesn't match "any byte". Without the /s flag, it doesn't match newline characters.
-rw-r--r--lib/VNDBUtil.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDBUtil.pm b/lib/VNDBUtil.pm
index febce0c0..5e7135cf 100644
--- a/lib/VNDBUtil.pm
+++ b/lib/VNDBUtil.pm
@@ -259,7 +259,7 @@ sub norm_ip {
# and the actual masking is quite trivial in binary form.
$ip = inet_pton AF_INET6, $ip;
return '::' if !$ip;
- $ip =~ s/^(.{6}).+$/$1 . "\0"x10/e;
+ $ip =~ s/^(.{6}).+$/$1 . "\0"x10/se;
return inet_ntop AF_INET6, $ip;
}