mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[harfruzz] Handle buffer allocation failure
This commit is contained in:
1 parent
a78d2f27ab
commit
790506ef51
1 file changed
+3
@@ -105,6 +105,9 @@ pub unsafe extern "C" fn _hb_harfruzz_shape_rs(
|
||||
hb_buffer_content_type_t_HB_BUFFER_CONTENT_TYPE_GLYPHS,
|
||||
);
|
||||
hb_buffer_set_length(buffer, count as u32);
|
||||
if hb_buffer_get_length(buffer) != count as u32 {
|
||||
return false as hb_bool_t;
|
||||
}
|
||||
let infos = hb_buffer_get_glyph_infos(buffer, null_mut());
|
||||
let positions = hb_buffer_get_glyph_positions(buffer, null_mut());
|
||||
|
||||
|
||||
Reference in new issue
Block a user