mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-26 09:03:33 +03:00
Add one more check to double free validation.
This commit is contained in:
parent
5e460bfea2
commit
6a8ef75364
1 changed files with 2 additions and 1 deletions
|
|
@ -68,7 +68,8 @@ large_dalloc_safety_checks(edata_t *edata, const void *ptr, size_t input_size) {
|
||||||
"possibly caused by double free bugs.", ptr);
|
"possibly caused by double free bugs.", ptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (unlikely(input_size != edata_usize_get(edata))) {
|
if (unlikely(input_size != edata_usize_get(edata) ||
|
||||||
|
input_size > SC_LARGE_MAXCLASS)) {
|
||||||
safety_check_fail_sized_dealloc(/* current_dealloc */ true, ptr,
|
safety_check_fail_sized_dealloc(/* current_dealloc */ true, ptr,
|
||||||
/* true_size */ edata_usize_get(edata), input_size);
|
/* true_size */ edata_usize_get(edata), input_size);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue