Title: [125791] trunk/Source/WebCore
Revision
125791
Author
[email protected]
Date
2012-08-16 10:33:29 -0700 (Thu, 16 Aug 2012)

Log Message

[GTK] Bad utf8 data is being passed to enchant_dict_check
https://bugs.webkit.org/show_bug.cgi?id=94202

Patch by Mario Sanchez Prada <[email protected]> on 2012-08-16
Reviewed by Martin Robinson.

Pass the number of bytes instead of the number of UTF8 characters
when calling enchant_dict_check.

* platform/text/gtk/TextCheckerEnchant.cpp:
(TextCheckerEnchant::checkSpellingOfString): Use 'bytes' instead
of 'wordLength'.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125790 => 125791)


--- trunk/Source/WebCore/ChangeLog	2012-08-16 17:22:44 UTC (rev 125790)
+++ trunk/Source/WebCore/ChangeLog	2012-08-16 17:33:29 UTC (rev 125791)
@@ -1,3 +1,17 @@
+2012-08-16  Mario Sanchez Prada  <[email protected]>
+
+        [GTK] Bad utf8 data is being passed to enchant_dict_check
+        https://bugs.webkit.org/show_bug.cgi?id=94202
+
+        Reviewed by Martin Robinson.
+
+        Pass the number of bytes instead of the number of UTF8 characters
+        when calling enchant_dict_check.
+
+        * platform/text/gtk/TextCheckerEnchant.cpp:
+        (TextCheckerEnchant::checkSpellingOfString): Use 'bytes' instead
+        of 'wordLength'.
+
 2012-08-16  Sergey Rogulenko  <[email protected]>
 
         Web Inspector: added Paint events for Images to TimelineAgent

Modified: trunk/Source/WebCore/platform/text/gtk/TextCheckerEnchant.cpp (125790 => 125791)


--- trunk/Source/WebCore/platform/text/gtk/TextCheckerEnchant.cpp	2012-08-16 17:22:44 UTC (rev 125790)
+++ trunk/Source/WebCore/platform/text/gtk/TextCheckerEnchant.cpp	2012-08-16 17:33:29 UTC (rev 125791)
@@ -115,7 +115,7 @@
             g_utf8_strncpy(word.get(), cstart, wordLength);
 
             for (; dictIter != m_enchantDictionaries.end(); ++dictIter) {
-                if (enchant_dict_check(*dictIter, word.get(), wordLength)) {
+                if (enchant_dict_check(*dictIter, word.get(), bytes)) {
                     misspellingLocation = start;
                     misspellingLength = wordLength;
                 } else {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to