Quellcode durchsuchen

HPCC-12488 LDAP Security core if reference uninitialized member

If the CLDAPGetValuesLenWrapper class gets constructed via the ctor that
accepts arguments, bvalues does not get initialized and can core later when
calling getValues. This fix initializes that member in both constructors.

Signed-off-by: William Whitehead <william.whitehead@lexisnexis.com>
William Whitehead vor 10 Jahren
Ursprung
Commit
1ab7dc538e
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1 0
      system/security/LdapSecurity/ldapconnection.cpp

+ 1 - 0
system/security/LdapSecurity/ldapconnection.cpp

@@ -943,6 +943,7 @@ public:
     }
     CLDAPGetValuesLenWrapper(LDAP *ld, LDAPMessage *msg, const char * attr)
     {
+        bvalues = NULL;
         getValues(ld,msg,attr);
     }