summaryrefslogtreecommitdiff
path: root/user/libreoffice/mso-lockfile-utf16le.patch
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-06-27 01:49:03 -0400
committerMax Rees <maxcrees@me.com>2020-02-04 19:36:05 -0600
commit00075f842380bff25a1b88a27056973d0341fb31 (patch)
tree371421dbc3c11e203a80fb1ebaa5bb7fbab7906f /user/libreoffice/mso-lockfile-utf16le.patch
parent38c71c751856ba192ebbb44fb8c13a7a3aee4e69 (diff)
downloadpackages-00075f842380bff25a1b88a27056973d0341fb31.tar.gz
packages-00075f842380bff25a1b88a27056973d0341fb31.tar.bz2
packages-00075f842380bff25a1b88a27056973d0341fb31.tar.xz
packages-00075f842380bff25a1b88a27056973d0341fb31.zip
user/libreoffice: [CVE] bump to 6.4.0.3 (#151)
* GTK+2 VCL plugin has been dropped upstream; move to GTK+3 * When porting 6.3.x.x, the Serbian and Serbian (Latin) translations did not build correctly, so they have been disabled for the time being. * Pin subpackage versions to eachother * Remove paxmark * makedepends changelog: + autoconf + automake + libqrcodegen ~ mdds~1.5 - paxmark - gtk+2.0-dev - gdk-pixbuf-dev + gtk+3.0-dev + mesa-dev ~ liborcus-dev~0.15
Diffstat (limited to 'user/libreoffice/mso-lockfile-utf16le.patch')
-rw-r--r--user/libreoffice/mso-lockfile-utf16le.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/user/libreoffice/mso-lockfile-utf16le.patch b/user/libreoffice/mso-lockfile-utf16le.patch
new file mode 100644
index 000000000..e71413e0a
--- /dev/null
+++ b/user/libreoffice/mso-lockfile-utf16le.patch
@@ -0,0 +1,33 @@
+--- libreoffice-6.3.1.2/svl/source/misc/msodocumentlockfile.cxx 2019-08-29 16:51:57.000000000 -0500
++++ libreoffice-6.3.1.2/svl/source/misc/msodocumentlockfile.cxx 2019-09-15 04:19:32.593900468 -0500
+@@ -12,6 +12,7 @@
+ #include <algorithm>
+ #include <ucbhelper/content.hxx>
+ #include <comphelper/processfactory.hxx>
++#include <oox/helper/helper.hxx>
+
+ #include <com/sun/star/io/IOException.hpp>
+ #include <com/sun/star/io/XOutputStream.hpp>
+@@ -220,7 +221,7 @@ LockFileEntry MSODocumentLockFile::GetLo
+ const int nACPLen = aBuf[0];
+ if (nACPLen > 0 && nACPLen <= 52) // skip wrong format
+ {
+- const sal_Int8* pBuf = aBuf.getConstArray() + 54;
++ sal_Int8* pBuf = aBuf.getArray() + 54;
+ int nUTF16Len = *pBuf; // try Word position
+ // If UTF-16 length is 0x20, then ACP length is also less than maximal, which means
+ // that in Word lockfile case, at least two preceding bytes would be zero. Both
+@@ -228,9 +229,12 @@ LockFileEntry MSODocumentLockFile::GetLo
+ if (nUTF16Len == 0x20 && (*(pBuf - 1) != 0 || *(pBuf - 2) != 0))
+ nUTF16Len = *++pBuf; // use Excel/PowerPoint position
+
+- if (nUTF16Len > 0 && nUTF16Len <= 52) // skip wrong format
++ if (nUTF16Len > 0 && nUTF16Len <= 52) { // skip wrong format
++ oox::ByteOrderConverter::convertLittleEndianArray(
++ reinterpret_cast<sal_Unicode*>(pBuf + 2), nUTF16Len);
+ aResult[LockFileComponent::OOOUSERNAME]
+ = OUString(reinterpret_cast<const sal_Unicode*>(pBuf + 2), nUTF16Len);
++ }
+ }
+ }
+ return aResult;