[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source
GülÅah Köse (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 23 09:18:55 UTC 2020
desktop/source/lib/init.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit fb8286255ff8d9872156a73dc0cf32ab04bf8f2a
Author: Gülşah Köse <gulsah.kose at collabora.com>
AuthorDate: Fri Oct 23 01:35:41 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Oct 23 11:18:20 2020 +0200
Prevent crash with invalid lang tag.
Change-Id: I778b5b007d4edce946e8b4c26e5a07f12103a968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104673
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index abde59b9b5c6..0d80378f7c31 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2239,8 +2239,9 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
// not pass it as a parameter to the filter
OUString aOptions = getUString(pOptions);
const OUString aLanguage = extractParameter(aOptions, "Language");
+ bool isValidLangTag = LanguageTag::isValidBcp47(aLanguage, nullptr);
- if (!aLanguage.isEmpty())
+ if (!aLanguage.isEmpty() && isValidLangTag)
{
SfxLokHelper::setDefaultLanguage(aLanguage);
// Set the LOK language tag, used for dialog tunneling.
More information about the Libreoffice-commits
mailing list