diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-08-11 00:01:20 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-08-11 00:12:20 +0200 |
commit | 7d8cd0abb8e4b1b891e982d10f57de108aaca1ea (patch) | |
tree | 754d755a72c62cf1644cda1c5772ad6814774c0e /sw/source/filter/ascii | |
parent | 1e0a822fa14eb4f8d3da80cf76dd5a43df472649 (diff) |
fdo#53328: sw: ascii import: fix crash:
The aWork buffer is missing space for the null terminator, which the
previous String::AllocateBuffer automatically added.
(regression from aac04652fda01b0299e17087b151f07d6115e894)
Change-Id: Ia12ad46dfb95dd59965a073debb95b241b2e97d9
Diffstat (limited to 'sw/source/filter/ascii')
-rw-r--r-- | sw/source/filter/ascii/parasc.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index ec68e011f138..4d53a8f40b01 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -331,7 +331,7 @@ sal_uLong SwASCIIParser::ReadChars() { sal_uInt32 nInfo; sal_Size nNewLen = lGCount, nCntBytes; - aWork.reset(new sal_Unicode[nNewLen]); + aWork.reset(new sal_Unicode[nNewLen + 1]); // add 1 for '\0' sal_Unicode* pBuf = aWork.get(); nNewLen = rtl_convertTextToUnicode( hConverter, hContext, |