Luna/libluna/include/luna
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
..
Alignment.h libluna: Let Alignment.h functions take non-powers-of-two 2023-03-07 20:37:30 +01:00
Alloc.h luna -> libluna 2023-02-27 15:22:39 +01:00
Atomic.h luna -> libluna 2023-02-27 15:22:39 +01:00
Attributes.h luna -> libluna 2023-02-27 15:22:39 +01:00
Badge.h luna -> libluna 2023-02-27 15:22:39 +01:00
Bitmap.h luna -> libluna 2023-02-27 15:22:39 +01:00
Buffer.h Buffer: Add an append_data() method 2023-03-23 21:20:57 +01:00
Check.h luna -> libluna 2023-02-27 15:22:39 +01:00
CircularQueue.h luna -> libluna 2023-02-27 15:22:39 +01:00
CPath.h vfs: Add support for creating directories given a full path 2023-03-11 01:13:44 +01:00
CString.h libluna+libc: Add strncmp, strncat and strncpy 2023-03-12 15:20:44 +01:00
CType.h luna -> libluna 2023-02-27 15:22:39 +01:00
DebugLog.h luna -> libluna 2023-02-27 15:22:39 +01:00
Format.h luna: Adjust cstyle_format's description 2023-03-02 13:40:42 +01:00
Heap.h luna -> libluna 2023-02-27 15:22:39 +01:00
Ignore.h luna -> libluna 2023-02-27 15:22:39 +01:00
LinkedList.h luna -> libluna 2023-02-27 15:22:39 +01:00
Move.h luna -> libluna 2023-02-27 15:22:39 +01:00
NumberParsing.h luna -> libluna 2023-02-27 15:22:39 +01:00
Option.h kernel: Remove FileDescriptorTable and add a helper to resolve fds to FileDescriptors 2023-03-12 13:57:38 +01:00
OwnedPtr.h luna -> libluna 2023-02-27 15:22:39 +01:00
OwnedStringView.h luna -> libluna 2023-02-27 15:22:39 +01:00
PathParser.h vfs: Add support for creating directories given a full path 2023-03-11 01:13:44 +01:00
PlacementNew.h luna -> libluna 2023-02-27 15:22:39 +01:00
Result.h luna -> libluna 2023-02-27 15:22:39 +01:00
SafeArithmetic.h luna -> libluna 2023-02-27 15:22:39 +01:00
ScopeGuard.h luna -> libluna 2023-02-27 15:22:39 +01:00
SharedPtr.h luna -> libluna 2023-02-27 15:22:39 +01:00
SourceLocation.h luna -> libluna 2023-02-27 15:22:39 +01:00
Spinlock.h luna -> libluna 2023-02-27 15:22:39 +01:00
Stack.h luna -> libluna 2023-02-27 15:22:39 +01:00
StaticString.h libluna/StaticString: Rename OSize to OtherSize 2023-03-08 16:41:09 +01:00
Syscall.h kernel+libc: Implement fcntl() for F_DUPFD and F_DUPFD_CLOEXEC 2023-03-24 21:33:20 +01:00
SystemError.h luna: Add error_name, similar to strerrorname_np from glibc 2023-03-07 13:14:21 +01:00
TarStream.h libluna/TarStream: Remove unused functionality 2023-03-17 00:00:27 +01:00
Types.h luna -> libluna 2023-02-27 15:22:39 +01:00
TypeTraits.h luna -> libluna 2023-02-27 15:22:39 +01:00
UBSAN.h luna -> libluna 2023-02-27 15:22:39 +01:00
Units.h luna -> libluna 2023-02-27 15:22:39 +01:00
Utf8.h luna -> libluna 2023-02-27 15:22:39 +01:00
Vector.h Vector: Let realloc do its job and thus avoid a UAF (a particularly nasty one) 2023-03-28 18:37:12 +02:00