Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static BOOL ImageArray_Alloc(LP_IMAGE_ARRAY_DATA iad, int size)
- {
- ...
- memset(&iad->nodes[iad->nodes_allocated_size],
- (size_grow - iad->nodes_allocated_size) *
- sizeof(IMAGE_ARRAY_DATA_NODE),
- 0);
- ...
- }
- Arguments are mixed up. This is what should have been written here: memset(&iad->nodes[iad->nodes_allocated_size], 0, (size_grow - iad->nodes_allocated_size) * sizeof(IMAGE_ARRAY_DATA_NODE));
- This suspicious code was found in Miranda IM project by PVS-Studio static code analyzer.
- Warning message is:
- V575 The 'memcmp' function processes '0' elements. Inspect the 'third' argument. clist_modern modern_image_array.cpp 59
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement