From b1ecd74b3d88b1fbf067e68bc438a4bcdbe426ff Mon Sep 17 00:00:00 2001 From: suhyung Eom Date: Fri, 30 Dec 2016 14:39:10 +0900 Subject: [PATCH 1/1] [3.0] Fixed crash issue by referencing unallocated memory Crash was occurred when referencing unallocated memory Wrong memory of DefaultFont->FindFont was used with condition (script = TextAbstraction::UNKNOWN and defaultFonts != NULL) Signed-off-by: suhyung Eom Change-Id: Ifacceb7b6766156c7d3b11d2c2408f57dad2e6ee --- dali-toolkit/internal/text/multi-language-support-impl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/internal/text/multi-language-support-impl.cpp b/dali-toolkit/internal/text/multi-language-support-impl.cpp index ae9a68b..c803c1d 100644 --- a/dali-toolkit/internal/text/multi-language-support-impl.cpp +++ b/dali-toolkit/internal/text/multi-language-support-impl.cpp @@ -477,7 +477,7 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, currentFontId = fontId; // Get the script for the current character. - const Script script = GetScript( index, + Script script = GetScript( index, scriptRunIt, scriptRunEndIt ); @@ -494,6 +494,10 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, description.path.c_str() ); } #endif + if (script == TextAbstraction::UNKNOWN) + { + script = TextAbstraction::LATIN; + } // Validate whether the current character is supported by the given font. bool isValidFont = false; -- 2.7.4