summaryrefslogtreecommitdiff
path: root/sw/source/filter/ascii/parasc.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-05 15:49:47 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-01-05 17:36:14 +0100
commitba5d09072c4e9c103f6af3c44e689bc6c93e0477 (patch)
tree4116c13d2b2c99efcd5c80be6d500304c77b0ba9 /sw/source/filter/ascii/parasc.cxx
parent76b878d66dfb464accc4d1ce83b0d1f5c1094abc (diff)
valgrind: uninitialized read
on loading id:000386,src:000000,op:havoc,rep:128.jpg as text Change-Id: I98364ffbcc4ea788613cc8071c4d8774ba167033 (cherry picked from commit 0b39d560da27ece227830a4bcc5556ae902a0921) Reviewed-on: https://gerrit.libreoffice.org/13744 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sw/source/filter/ascii/parasc.cxx')
-rw-r--r--sw/source/filter/ascii/parasc.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index ddc685595c86..11c7f2ed4931 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -324,6 +324,7 @@ sal_uLong SwASCIIParser::ReadChars()
sal_Size nNewLen = lGCount, nCntBytes;
aWork.reset(new sal_Unicode[nNewLen + 1]); // add 1 for '\0'
sal_Unicode* pBuf = aWork.get();
+ pBuf[nNewLen] = 0; // ensure '\0'
nNewLen = rtl_convertTextToUnicode( hConverter, hContext,
pArr, lGCount, pBuf, nNewLen,