mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 13:53:11 +00:00
Add one more check to double free validation.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user