mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17: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:
parent
e80c0bde70
commit
3f838768d9
2 changed files with 36 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
|||
__BEGIN_DECLS
|
||||
|
||||
typedef struct {
|
||||
uint32_t magic;
|
||||
uint32_t value;
|
||||
} sem_t;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue