From b6329e9f58f44910a6c83e0434d02b97d5bf0149 Mon Sep 17 00:00:00 2001 From: Taeyun An Date: Tue, 9 Jul 2013 14:33:27 +0900 Subject: [PATCH] Create string tightly when retrive string from cbhm [Title] Create string tightly when retrive string from cbhm [Issue#] DCM-1658 [Problem] \u0000 null value is inserted at the end of string. [Cause] Included null value string length is returned when use XGetWindowProperty API. [Solution] Create string tightly when retrive string from cbhm Change-Id: Ifc48ac491a33f0953b808029f45841c4a8174751 --- Source/WebKit2/UIProcess/API/efl/tizen/ClipboardHelper.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/WebKit2/UIProcess/API/efl/tizen/ClipboardHelper.cpp b/Source/WebKit2/UIProcess/API/efl/tizen/ClipboardHelper.cpp index 81b5b10..6e6d6d7 100755 --- a/Source/WebKit2/UIProcess/API/efl/tizen/ClipboardHelper.cpp +++ b/Source/WebKit2/UIProcess/API/efl/tizen/ClipboardHelper.cpp @@ -696,14 +696,14 @@ String ClipboardHelper::getCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom property, return String(); } - String chbmData; + String cbhmData; switch (dataUnitSize) { case 8: - chbmData = String::fromUTF8(pData, dataLength); + cbhmData = String::fromUTF8(pData); break; case 16: - chbmData = String(reinterpret_cast(pData), dataLength); + cbhmData = String(reinterpret_cast(pData), dataLength); LOG_ERROR("case 16"); break; case 32: @@ -718,7 +718,7 @@ String ClipboardHelper::getCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom property, if (pDataType) *pDataType = type; - return chbmData; + return cbhmData; } bool ClipboardHelper::retrieveClipboardItem(int index, int* format, String* pData) -- 2.7.4