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

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