mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Avoid overflow in freetype/font_context.rs
This commit is contained in:
parent
f8c2c3c3e4
commit
7cbef87b00
1 changed files with 2 additions and 1 deletions
|
@ -57,7 +57,8 @@ extern fn ft_realloc(mem: FT_Memory, _cur_size: c_long, new_req_size: c_long,
|
|||
let new_actual_size = heap_size_of(new_ptr);
|
||||
|
||||
let user = (*mem).user as *mut User;
|
||||
(*user).size += new_actual_size - old_actual_size;
|
||||
(*user).size += new_actual_size;
|
||||
(*user).size -= old_actual_size;
|
||||
|
||||
new_ptr
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue