From efbd217afc52390138195e06e96ef9c8f10bf37b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 5 Mar 2019 13:25:16 +0000 Subject: Resolves: tdf#123815 null terminator included in string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit regression from... commit 18d636063fd7be165e7888af49372a6e2b851776 Author: Caolán McNamara Date: Mon Jun 19 09:46:31 2017 +0100 ofz: use OString instead of bare char* this is no use to the reporter though, as the document format is 10 and 11 is the oldest the filter will open Change-Id: I4cdfe92e37f047493a6eab95f0e8e9f5dced1a35 Reviewed-on: https://gerrit.libreoffice.org/68745 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- lotuswordpro/source/filter/tocread.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lotuswordpro') diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx index e2421efb0931..203fe79a466f 100644 --- a/lotuswordpro/source/filter/tocread.cxx +++ b/lotuswordpro/source/filter/tocread.cxx @@ -290,7 +290,9 @@ CBenTOCReader::ReadTOC() return Err; } - OString sName(sBuffer, Length); + OString sName; + if (Length) + sName = OString(sBuffer, Length - 1); CUtListElmt * pPrevNamedObjectListElmt; if (FindNamedObject(&cpContainer->GetNamedObjects(), -- cgit