Title: [150350] trunk/Source/WebCore
- Revision
- 150350
- Author
- [email protected]
- Date
- 2013-05-19 07:56:07 -0700 (Sun, 19 May 2013)
Log Message
GtkSelectionData length is off by one
https://bugs.webkit.org/show_bug.cgi?id=113962
Reviewed by Anders Carlsson.
No new tests. Since drag data is interpreted as a null-terminated string
this is difficult to test with a C program and we have no infrastructure
built for using GIR tests.
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::fillSelectionData): Instead of including the null
character in the paste data length, just include the string. This matches the behavior
of Firefox.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (150349 => 150350)
--- trunk/Source/WebCore/ChangeLog 2013-05-19 03:01:05 UTC (rev 150349)
+++ trunk/Source/WebCore/ChangeLog 2013-05-19 14:56:07 UTC (rev 150350)
@@ -1,3 +1,19 @@
+2013-05-19 Martin Robinson <[email protected]>
+
+ GtkSelectionData length is off by one
+ https://bugs.webkit.org/show_bug.cgi?id=113962
+
+ Reviewed by Anders Carlsson.
+
+ No new tests. Since drag data is interpreted as a null-terminated string
+ this is difficult to test with a C program and we have no infrastructure
+ built for using GIR tests.
+
+ * platform/gtk/PasteboardHelper.cpp:
+ (WebCore::PasteboardHelper::fillSelectionData): Instead of including the null
+ character in the paste data length, just include the string. This matches the behavior
+ of Firefox.
+
2013-05-18 Simon Fraser <[email protected]>
Hoist several chunks of code at the top of RenderLayer::paintLayerContents() onto new functions
Modified: trunk/Source/WebCore/platform/gtk/PasteboardHelper.cpp (150349 => 150350)
--- trunk/Source/WebCore/platform/gtk/PasteboardHelper.cpp 2013-05-19 03:01:05 UTC (rev 150349)
+++ trunk/Source/WebCore/platform/gtk/PasteboardHelper.cpp 2013-05-19 14:56:07 UTC (rev 150350)
@@ -166,12 +166,12 @@
// prefixed by a content-type meta tag.
CString markup = String(gMarkupPrefix + dataObject->markup()).utf8();
gtk_selection_data_set(selectionData, markupAtom, 8,
- reinterpret_cast<const guchar*>(markup.data()), markup.length() + 1);
+ reinterpret_cast<const guchar*>(markup.data()), markup.length());
} else if (info == TargetTypeURIList) {
CString uriList = dataObject->uriList().utf8();
gtk_selection_data_set(selectionData, uriListAtom, 8,
- reinterpret_cast<const guchar*>(uriList.data()), uriList.length() + 1);
+ reinterpret_cast<const guchar*>(uriList.data()), uriList.length());
} else if (info == TargetTypeNetscapeURL && dataObject->hasURL()) {
String url(dataObject->url());
@@ -185,7 +185,7 @@
GOwnPtr<gchar> resultData(g_strdup(result.utf8().data()));
gtk_selection_data_set(selectionData, netscapeURLAtom, 8,
- reinterpret_cast<const guchar*>(resultData.get()), strlen(resultData.get()) + 1);
+ reinterpret_cast<const guchar*>(resultData.get()), strlen(resultData.get()));
} else if (info == TargetTypeImage)
gtk_selection_data_set_pixbuf(selectionData, dataObject->image());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes