Title: [230426] releases/WebKitGTK/webkit-2.20/Source/WebCore
- Revision
- 230426
- Author
- carlo...@webkit.org
- Date
- 2018-04-09 06:56:16 -0700 (Mon, 09 Apr 2018)
Log Message
Merge r230197 - [GTK] Segfaults in enchant_broker_free_dict()
https://bugs.webkit.org/show_bug.cgi?id=183738
Reviewed by Michael Catanzaro.
Check enchant_broker_request_dict() didn't return nullptr before adding it to the m_enchantDictionaries vector.
* platform/text/enchant/TextCheckerEnchant.cpp:
(WebCore::TextCheckerEnchant::updateSpellCheckingLanguages):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog (230425 => 230426)
--- releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog 2018-04-09 13:56:10 UTC (rev 230425)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog 2018-04-09 13:56:16 UTC (rev 230426)
@@ -1,5 +1,17 @@
2018-04-03 Carlos Garcia Campos <cgar...@igalia.com>
+ [GTK] Segfaults in enchant_broker_free_dict()
+ https://bugs.webkit.org/show_bug.cgi?id=183738
+
+ Reviewed by Michael Catanzaro.
+
+ Check enchant_broker_request_dict() didn't return nullptr before adding it to the m_enchantDictionaries vector.
+
+ * platform/text/enchant/TextCheckerEnchant.cpp:
+ (WebCore::TextCheckerEnchant::updateSpellCheckingLanguages):
+
+2018-04-03 Carlos Garcia Campos <cgar...@igalia.com>
+
[GTK] NetworkProcess from WebKitGtk+ 2.19.9x SIGSEVs in NetworkStorageSession (secret search callback)
https://bugs.webkit.org/show_bug.cgi?id=183346
Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/text/enchant/TextCheckerEnchant.cpp (230425 => 230426)
--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/text/enchant/TextCheckerEnchant.cpp 2018-04-09 13:56:10 UTC (rev 230425)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/text/enchant/TextCheckerEnchant.cpp 2018-04-09 13:56:16 UTC (rev 230426)
@@ -140,8 +140,8 @@
for (auto& language : languages) {
CString currentLanguage = language.utf8();
if (enchant_broker_dict_exists(m_broker, currentLanguage.data())) {
- EnchantDict* dict = enchant_broker_request_dict(m_broker, currentLanguage.data());
- spellDictionaries.append(dict);
+ if (auto* dict = enchant_broker_request_dict(m_broker, currentLanguage.data()))
+ spellDictionaries.append(dict);
}
}
} else {
@@ -149,15 +149,15 @@
CString utf8Language = defaultLanguage().utf8();
const char* language = utf8Language.data();
if (enchant_broker_dict_exists(m_broker, language)) {
- EnchantDict* dict = enchant_broker_request_dict(m_broker, language);
- spellDictionaries.append(dict);
+ if (auto* dict = enchant_broker_request_dict(m_broker, language))
+ spellDictionaries.append(dict);
} else {
// No dictionaries selected, we get the first one from the list.
Vector<CString> allDictionaries;
enchant_broker_list_dicts(m_broker, enchantDictDescribeCallback, &allDictionaries);
if (!allDictionaries.isEmpty()) {
- EnchantDict* dict = enchant_broker_request_dict(m_broker, allDictionaries.first().data());
- spellDictionaries.append(dict);
+ if (auto* dict = enchant_broker_request_dict(m_broker, allDictionaries.first().data()))
+ spellDictionaries.append(dict);
}
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes