You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When popping from a darray by index there is an issue when moving the data.
// If not on the last element, snip out the entry and copy the rest inward.
if (index != length - 1) {
kcopy_memory(
(void*)(addr + (index * stride)),
(void*)(addr + ((index + 1) * stride)),
stride * (length - (index - 1)));
}
The size of stride * (length - (index - 1)) will be too large, the correct value should be stride * (length - (index + 1)).
This has the potential to lead to memory corruption if not fixed.
The text was updated successfully, but these errors were encountered:
When popping from a darray by index there is an issue when moving the data.
The size of
stride * (length - (index - 1))
will be too large, the correct value should bestride * (length - (index + 1))
.This has the potential to lead to memory corruption if not fixed.
The text was updated successfully, but these errors were encountered: