PengZheng commented on a change in pull request #404:
URL: https://github.com/apache/celix/pull/404#discussion_r832128453



##########
File path: libs/utils/src/array_list.c
##########
@@ -197,7 +197,7 @@ int arrayList_addIndex(array_list_pt list, unsigned int 
index, void * element) {
     }
     arrayList_ensureCapacity(list, (int)list->size+1);
     numMoved = list->size - index;
-    memmove(list->elementData+(index+1), list->elementData+index, sizeof(void 
*) * numMoved);
+    memmove(list->elementData+(index+1), list->elementData+index, 
sizeof(celix_array_list_entry_t) * numMoved);

Review comment:
       If sizeof(void*) != sizeof(entry), then use of sizeof(void*) is buggy.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to