mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
Fix possible NULL pointer dereference in VERIFY_READ
Static analysis flagged this. Fixed by simply checking `oldlenp` before dereferencing it.
This commit is contained in:
parent
12311fe6c3
commit
dc0a184f8d
1 changed files with 3 additions and 1 deletions
|
|
@ -1816,7 +1816,9 @@ ctl_mtx_assert_held(tsdn_t *tsdn) {
|
|||
/* Verify that the space provided is enough. */
|
||||
#define VERIFY_READ(t) do { \
|
||||
if (oldp == NULL || oldlenp == NULL || *oldlenp != sizeof(t)) { \
|
||||
*oldlenp = 0; \
|
||||
if (oldlenp != NULL) { \
|
||||
*oldlenp = 0; \
|
||||
} \
|
||||
ret = EINVAL; \
|
||||
goto label_return; \
|
||||
} \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue