From 0b39d560da27ece227830a4bcc5556ae902a0921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 5 Jan 2015 15:49:47 +0000 Subject: valgrind: uninitialized read on loading id:000386,src:000000,op:havoc,rep:128.jpg as text Change-Id: I98364ffbcc4ea788613cc8071c4d8774ba167033 --- sw/source/filter/ascii/parasc.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw') 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, -- cgit v1.2.1