srdja / Collections-C

A library of generic data structures for the C language.
http://srdja.github.io/Collections-C
GNU Lesser General Public License v3.0
2.83k stars 328 forks source link

List remove performs heap buffer overflow #118

Closed giltho closed 5 years ago

giltho commented 5 years ago

The computation of the number of blocks to move in array_remove is wrong. Whenever the array is full, and memory is moved, there is an extra 8 bytes that are moved inside the array's buffer.

A pull request is incoming to fix that.