Luna/libluna
apio b8b8d20f5b
All checks were successful
continuous-integration/drone/push Build is passing
Vector: Let realloc do its job and thus avoid a UAF (a particularly nasty one)
Who even thought that copying from an old pointer passed to realloc() was a good idea?
Me, apparently.

Additionally, the entire point of this memcpy() was to copy the data over from the old buffer (which is already freed btw) to the new buffer, which is already done by realloc.
That's the entire point of realloc. The data is copied over by realloc already.

And even if the old pointer is not unmapped, we scrub freed memory with useless data, so the memcpy sets the vector's buffer to that useless data as well.

I don't even know how I managed to introduce so many bugs into Vector.

At least it should work properly now.
2023-03-28 18:37:12 +02:00
..
include/luna Vector: Let realloc do its job and thus avoid a UAF (a particularly nasty one) 2023-03-28 18:37:12 +02:00
src Buffer: Add an append_data() method 2023-03-23 21:20:57 +01:00
CMakeLists.txt vfs: Add support for creating directories given a full path 2023-03-11 01:13:44 +01:00