Code analyser tool runned against QT including HarfBuzz reveiled resource leak in ::HB_ArabicShape Fix proposal: diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c b/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c index 3837087..51f839a 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-arabic.c @@ -1111,16 +1111,22 @@ HB_Bool HB_ArabicShape(HB_ShaperItem *item) if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_features : syriac_features)) { HB_Bool ot_ok; - if (arabicSyriacOpenTypeShape(item, &ot_ok)) + if (arabicSyriacOpenTypeShape(item, &ot_ok)) { + HB_FREE_STACKARRAY(shapedChars); return TRUE; - if (ot_ok) + } + if (ot_ok) { + HB_FREE_STACKARRAY(shapedChars); return FALSE; /* fall through to the non OT code*/ + } } #endif - if (item->item.script != HB_Script_Arabic) + if (item->item.script != HB_Script_Arabic) { + HB_FREE_STACKARRAY(shapedChars); return HB_BasicShape(item); + } shapedString(item->string, item->stringLength, item->item.pos, item->item.length, shapedChars, &slen, item->item.bidiLevel % 2,
Do you have a git tree with these all?
Yes I do, but unfortunately it is a private repository that you can't have access. Would patch files from each issue help or is the current info enough?
I don't really maintain that tree (aka old harfbuzz). Lars Knoll and Simon Hausmann do, and have commit access to it. Can you bring your internal tree to their attention please?
(In reply to comment #3) > I don't really maintain that tree (aka old harfbuzz). Lars Knoll and Simon > Hausmann do, and have commit access to it. Can you bring your internal tree to > their attention please? Yes, I guess it is possible. Could you tell me how to do it?
Nevermind. I'm contacting them.
Any news related to this one?
I emailed Lars and Simon but have not heard back from them. If you push a tree out to github or something, I can take a look.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.