Blame SOURCES/0017-Ticket-48681-Use-of-uninitialized-value-in-string-ne.patch

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