diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/slibc-alloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/slibc-alloc.c b/src/slibc-alloc.c index 91478c6..e6a294b 100644 --- a/src/slibc-alloc.c +++ b/src/slibc-alloc.c @@ -281,6 +281,9 @@ void* rememalign(void* ptr, size_t boundary, size_t size, enum rememalign_mode m size_t old_size; void* new_ptr; + if ((enum rememalign_mode)(conf_clear | conf_init | conf_memcpy) != mode) + return errno = EINVAL, NULL; + if (size == 0) return secure_free(ptr), NULL; |