Title: [171272] branches/safari-537.78-branch/Source/WebCore
- Revision
- 171272
- Author
- [email protected]
- Date
- 2014-07-19 16:19:28 -0700 (Sat, 19 Jul 2014)
Log Message
Merged r170513. <rdar://problem/17684622>
Modified Paths
Diff
Modified: branches/safari-537.78-branch/Source/WebCore/ChangeLog (171271 => 171272)
--- branches/safari-537.78-branch/Source/WebCore/ChangeLog 2014-07-19 23:07:01 UTC (rev 171271)
+++ branches/safari-537.78-branch/Source/WebCore/ChangeLog 2014-07-19 23:19:28 UTC (rev 171272)
@@ -1,5 +1,22 @@
2014-07-19 Lucas Forschler <[email protected]>
+ Merge r170513
+
+ 2014-06-26 David Kilzer <[email protected]>
+
+ [Win] Always NULL-terminate the string in createUTF8String()
+ <http://webkit.org/b/134353>
+ <rdar://problem/17471783>
+
+ Reviewed by Brent Fulgham.
+
+ * plugins/PluginView.cpp:
+ (WebCore::createUTF8String): Pull out CString length into local
+ variable. Switch to use memcpy. Always NULL-terminate the
+ string.
+
+2014-07-19 Lucas Forschler <[email protected]>
+
Merge r170028
2014-06-16 Chris Fleizach <[email protected]>
Modified: branches/safari-537.78-branch/Source/WebCore/plugins/PluginView.cpp (171271 => 171272)
--- branches/safari-537.78-branch/Source/WebCore/plugins/PluginView.cpp 2014-07-19 23:07:01 UTC (rev 171271)
+++ branches/safari-537.78-branch/Source/WebCore/plugins/PluginView.cpp 2014-07-19 23:19:28 UTC (rev 171272)
@@ -407,9 +407,11 @@
static char* createUTF8String(const String& str)
{
CString cstr = str.utf8();
- char* result = reinterpret_cast<char*>(fastMalloc(cstr.length() + 1));
+ const size_t cstrLength = cstr.length();
+ char* result = reinterpret_cast<char*>(fastMalloc(cstrLength + 1));
- strncpy(result, cstr.data(), cstr.length() + 1);
+ memcpy(result, cstr.data(), cstrLength);
+ result[cstrLength] = '\0';
return result;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes