[389-commits] ldap/servers

Noriko Hosoi nhosoi at fedoraproject.org
Thu Feb 26 19:14:13 UTC 2015


 ldap/servers/plugins/uiduniq/uid.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1aeaf342ff5050cfda23e05ae66b180a56a70e0e
Author: Noriko Hosoi <nhosoi at redhat.com>
Date:   Tue Feb 24 11:00:30 2015 -0800

    Ticket #48026 - Support for uniqueness plugin to enforce uniqueness on a set of attributes.
    
    Coverity defect 13088 - Wrong sized argument
    Introduced by commit 430410d75446cdf58e6f020e1463b590abd870ab
    Description: allocated the size of pointer instead of the size of
    character times attribute length.  The unit was fixed.
    
    https://fedorahosted.org/389/ticket/48026
    
    Reviewed and tested by William B <william.e.brown at adelaide.edu.au>.
    Thank you, William!!

diff --git a/ldap/servers/plugins/uiduniq/uid.c b/ldap/servers/plugins/uiduniq/uid.c
index 282f618..b9c4e72 100644
--- a/ldap/servers/plugins/uiduniq/uid.c
+++ b/ldap/servers/plugins/uiduniq/uid.c
@@ -367,7 +367,7 @@ uniqueness_entry_to_config(Slapi_PBlock *pb, Slapi_Entry *config_entry)
         for (i = 0; tmp_config->attrs && (tmp_config->attrs)[i]; i++) {
             attrLen += strlen((tmp_config->attrs)[i]) + 1;
         }
-        tmp_config->attr_friendly = (char *) slapi_ch_calloc(attrLen, sizeof(char *));
+        tmp_config->attr_friendly = (char *) slapi_ch_calloc(attrLen, sizeof(char));
         fp = tmp_config->attr_friendly;
         for (i = 0; tmp_config->attrs && (tmp_config->attrs)[i]; i++) {
             strcpy(fp, (tmp_config->attrs)[i] );




More information about the 389-commits mailing list