diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-06-30 22:55:46 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-07-01 16:06:12 +0200 |
commit | 89e19634a775d53ea855db8767113f3ab08a3479 (patch) | |
tree | eafee506a17cca6e13eaf6dcb8494f37d6c9275f /sw | |
parent | 306ff415cb19b1a3f01a6deda0f5f0d41c60594a (diff) |
tdf#143081: fix Basic Replace() function crashes LO
0x00007f19c0aa6e57 in rtl::OUStringBuffer::append(char16_t const*, int) (this=0x7fff100d0748, str=0x6f6f46a u"晦饖香©", len=-1) at include/rtl/ustrbuf.hxx:659
0x00007f19c0c3c8a8 in SbRtl_Replace(StarBASIC*, SbxArray&, bool) (rPar=...) at basic/source/runtime/methods.cxx:1321
see bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=173298
Calling xCharClass->toUpper may change words, eg: "Straße" becomes "Strasse"
so the length of the word increases.
In brief, we want to use the length of aSrcStr not aExpStr
Change-Id: Ia291d47a2021efc7dd9162ca5cc72b7940fdd71e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118202
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 4a0b40f1be9f6773c8ebc5331c257911a76a5cee)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118178
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
0 files changed, 0 insertions, 0 deletions