mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-18 14:47:18 +03:00
fix: V-001 security vulnerability
Automated security fix generated by OrbisAI Security
This commit is contained in:
parent
db15a39d75
commit
17488da0da
1 changed files with 2 additions and 2 deletions
|
|
@ -1920,10 +1920,10 @@ ctl_writeonly(void *oldp, size_t *oldlenp) {
|
|||
static inline int
|
||||
ctl_assured_write(void *dst, size_t dst_size, const void *newp,
|
||||
size_t newlen) {
|
||||
if (newp == NULL || newlen != dst_size) {
|
||||
if (newp == NULL || newlen > dst_size) {
|
||||
return EINVAL;
|
||||
}
|
||||
memcpy(dst, newp, dst_size);
|
||||
memcpy(dst, newp, newlen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue