zrhoffman / rpms / 389-ds-base

Forked from rpms/389-ds-base 3 years ago
Clone

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

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