فهرست منبع

Bug 688341 - (cov#10703) Fix Coverity code maintainability issues

We are computing the size of memory needed by using the incorrect
pointer type.
Nathan Kinder 14 سال پیش
والد
کامیت
dcedbebf2d
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      ldap/servers/slapd/vattr.c

+ 2 - 2
ldap/servers/slapd/vattr.c

@@ -1704,9 +1704,9 @@ int vattr_call_sp_get_batch_values(vattr_sp_handle *handle, vattr_context *c, Sl
 	else
 	{
 		/* make our args look like the simple non-batched case */
-		*results = (Slapi_ValueSet**)slapi_ch_calloc(2, sizeof(*results)); /* 2 for null terminated list */
+		*results = (Slapi_ValueSet**)slapi_ch_calloc(2, sizeof(**results)); /* 2 for null terminated list */
 		*type_name_disposition = (int *)slapi_ch_calloc(2, sizeof(*type_name_disposition));
-		*actual_type_name = (char**)slapi_ch_calloc(2, sizeof(*actual_type_name));
+		*actual_type_name = (char**)slapi_ch_calloc(2, sizeof(**actual_type_name));
 
 		ret =((handle->sp->sp_get_fn)(handle,c,e,*type,*results,*type_name_disposition,*actual_type_name,flags,buffer_flags, hint)); 
 		if (ret)