summaryrefslogtreecommitdiff
path: root/sw
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 16:06:59 +0000
commitd284e07bf30ce9f07000500f14d589ce386649c2 (patch)
tree6caaf79f2b687436708b2acc6102e9742b89eb91 /sw
parentaa05a786a500df6aa00f953649ee3dde25d81d48 (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/13743 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sw')
-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 68d8b382207f..d4e534796661 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -323,6 +323,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,