mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
SimpleShapedText: Fix potential heap buffer overflow
This commit is contained in:
parent
320a48ae82
commit
22d5d7a598
1 changed files with 3 additions and 3 deletions
|
|
@ -615,10 +615,10 @@ static RangedValues<Font> resolveFontsWithFallback (Span<const juce_wchar> strin
|
|||
|
||||
for (const auto [r, f] : fonts)
|
||||
{
|
||||
const auto constrained = r.constrainRange ({ 0, (int64) string.size() });
|
||||
const auto intersected = r.getIntersectionWith ({ 0, (int64) string.size() });
|
||||
auto rf = findSuitableFontsForText (f,
|
||||
{ string.data() + constrained.getStart(),
|
||||
(size_t) constrained.getLength() });
|
||||
{ string.data() + intersected.getStart(),
|
||||
(size_t) intersected.getLength() });
|
||||
|
||||
for (const auto [subRange, font] : rf)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue