From e46749b77d95ad8fedf07d38890573b2862badf7 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Oct 19 2017 18:44:38 +0000 Subject: Ticket 48681 - Use of uninitialized value in string ne at /usr/bin/logconv.pl line 2565, <$LOGFH> line 4 Bug description: The original fix for 48681 added a regression in regards to perl warning everytime you ran the script. That was due to a new hash for sasl binds that was not initialized. Fix Description: Check is the saslbind hash "exists" before checking its value. https://pagure.io/389-ds-base/issue/48681 Reviewed by: mreynolds (one line fix) --- diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl index 4932db4..473c71f 100755 --- a/ldap/admin/src/logconv.pl +++ b/ldap/admin/src/logconv.pl @@ -2562,7 +2562,7 @@ sub parseLineNormal if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){ $conn = $1; $op = $2; - if ($hashes->{saslconnop}->{$conn-$op} ne ""){ + if (exists $hashes->{saslconnop}->{$conn-$op} && $hashes->{saslconnop}->{$conn-$op} ne ""){ # This was a SASL BIND - record the dn if ($binddn ne ""){ if($binddn eq $rootDN){ $rootDNBindCount++; }