0c44a46 Ticket #547 - Incorrect assumption in ndn cache

Authored and Committed by Noriko Hosoi 11 years ago
    Ticket #547 - Incorrect assumption in ndn cache
    
    Bug Description: In ndn_cache_lookup, to determine the given dn
    is already normalized or not, the length is compared with the
    normalized dn length.  If they match, it considers the given dn
    is already normalized.  But there are cases even if the lengths
    are equal, the given dn may not be normalized yet.
    (e.g., 'cn="o=ABC",o=XYZ' vs. 'cn=o\3DABC,o=XYZ')
    
    Fix Description: This patch adds another check: if the dn and
    normalized dn length match, call memcmp to compare the 2 dn's.
    When memcmp returns 0, ndn_cache_lookup returns the passed dn.
    
    https://fedorahosted.org/389/ticket/547
    
    Reviewed by mreynolds (Thanks, Mark!).
    
        
file modified
+16 -13