Title: [151373] releases/WebKitGTK/webkit-2.0/Source/WebCore
- Revision
- 151373
- Author
- [email protected]
- Date
- 2013-06-10 03:00:06 -0700 (Mon, 10 Jun 2013)
Log Message
Merge r150350 - 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: releases/WebKitGTK/webkit-2.0/Source/WebCore/ChangeLog (151372 => 151373)
--- releases/WebKitGTK/webkit-2.0/Source/WebCore/ChangeLog 2013-06-10 09:56:37 UTC (rev 151372)
+++ releases/WebKitGTK/webkit-2.0/Source/WebCore/ChangeLog 2013-06-10 10:00:06 UTC (rev 151373)
@@ -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-08 Gustavo Noronha Silva <[email protected]>
[GStreamer] Does memory buffering even with preload set to none
Modified: releases/WebKitGTK/webkit-2.0/Source/WebCore/platform/gtk/PasteboardHelper.cpp (151372 => 151373)
--- releases/WebKitGTK/webkit-2.0/Source/WebCore/platform/gtk/PasteboardHelper.cpp 2013-06-10 09:56:37 UTC (rev 151372)
+++ releases/WebKitGTK/webkit-2.0/Source/WebCore/platform/gtk/PasteboardHelper.cpp 2013-06-10 10:00:06 UTC (rev 151373)
@@ -168,12 +168,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());
@@ -187,7 +187,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