diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-05 15:49:47 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-01-08 15:09:27 +0100 |
commit | b1fb1ac1ce8d95490e1da0a31917ab82210babe7 (patch) | |
tree | efa4ae3a67e7b2430a3ae79bddba86c87e55aef1 /sw | |
parent | 10e0f274aad7b9236b38c9354c004a8b14e29702 (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>
(cherry picked from commit 013a6f221179503dab331f0256a0efbf9a629336)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ascii/parasc.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 02a2ade1d2ac..2940767958cc 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -322,6 +322,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, |