1
0
Эх сурвалжийг харах

Coverity defects

12195, 13090: Dereference after null check
Noriko Hosoi 13 жил өмнө
parent
commit
daa43b7d35

+ 2 - 1
ldap/servers/slapd/dn.c

@@ -1129,8 +1129,9 @@ bail:
         *d = '\0';
     }
     /* add this dn to the normalized dn cache */
-    if(*dest)
+    if(dest && *dest && dest_len && *dest_len) {
         ndn_cache_add(udn, src_len, *dest, *dest_len);
+    }
 
     return rc;
 }