1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:27:35 +00:00

LibPthread: Add magic bytes to the start of sem_t structures

This helps ensure random pointers are not passed in as semaphores, but
more importantly once named semaphores are implemented, this will
ensure that random files are not used as semaphores.
This commit is contained in:
Idan Horowitz 2022-07-14 03:02:08 +03:00 committed by Andreas Kling
parent e80c0bde70
commit 3f838768d9
2 changed files with 36 additions and 1 deletions

View file

@ -14,6 +14,7 @@
__BEGIN_DECLS
typedef struct {
uint32_t magic;
uint32_t value;
} sem_t;