mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 08:21:32 +01:00
[subset] clamp distance to prevent shifting outside of the limits of int64.
Fixes https://oss-fuzz.com/testcase-detail/4961171477233664.
This commit is contained in:
1 parent
fcacd17748
commit
71d6d15600
2 files changed
+2
-1
No files matched your search
+2
-1
@@ -75,7 +75,8 @@ struct graph_t
|
||||
// setting distance = 0 which will force to sort immediately after
|
||||
// it's parent where possible.
|
||||
|
||||
int64_t modified_distance = distance + distance_modifier ();
|
||||
int64_t modified_distance =
|
||||
hb_min (hb_max(distance + distance_modifier (), 0), 0x7FFFFFFFFF);
|
||||
return (modified_distance << 24) | (0x00FFFFFF & order);
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user