desktop/source/lib/lokclipboard.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 11f71656025763073c2167bce0e86b727704990e Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Oct 26 14:25:26 2015 +0100 gtktiledviwer: try to paste as html, then as plain text This commit (as a side effect) fixes LOKTransferable::getTransferData() to not assume that the string is null-terminated, so it makes sense to backport it even without gtktiledviewer. Otherwise rtl_str_getLength() will read memory up till it finds a 0 byte, so it might read uninitialized memory -> garbage at the end of the string. (cherry picked from commit 080bd44f0b0300075ff18d377f31deebbc4009ed) Conflicts: libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx Change-Id: I8e1c93fd36fb903c0625b29f9f73825438c9e113 diff --git a/desktop/source/lib/lokclipboard.cxx b/desktop/source/lib/lokclipboard.cxx index 50d5705..376bcd7 100644 --- a/desktop/source/lib/lokclipboard.cxx +++ b/desktop/source/lib/lokclipboard.cxx @@ -43,7 +43,7 @@ throw(datatransfer::UnsupportedFlavorException, io::IOException, uno::RuntimeExc if (rFlavor.DataType == cppu::UnoType<OUString>::get()) { sal_Char* pText = reinterpret_cast<sal_Char*>(m_aSequence.getArray()); - aRet <<= OUString(pText, rtl_str_getLength(pText), RTL_TEXTENCODING_UTF8); + aRet <<= OUString(pText, m_aSequence.getLength(), RTL_TEXTENCODING_UTF8); } else aRet <<= m_aSequence; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits