svgio/qa/cppunit/SvgImportTest.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit 4dca59d90440311c7f383e332451b9c151519832 Author: Caolán McNamara <[email protected]> AuthorDate: Wed Dec 10 17:27:06 2025 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Dec 11 09:54:26 2025 +0100 don't tack on a extra null byte at the end of the stream Change-Id: I8fa54a6f8a69f4cbed1bf899ba0781096198ef81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195403 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 20db3664d879..20926c1dd0d8 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -52,11 +52,10 @@ Primitive2DSequence Test::parseSvg(std::u16string_view aSource) SvFileStream aFileStream(aUrl, StreamMode::READ); std::size_t nSize = aFileStream.remainingSize(); - std::unique_ptr<sal_Int8[]> pBuffer(new sal_Int8[nSize + 1]); + std::unique_ptr<sal_Int8[]> pBuffer(new sal_Int8[nSize]); aFileStream.ReadBytes(pBuffer.get(), nSize); - pBuffer[nSize] = 0; - Sequence<sal_Int8> aData(pBuffer.get(), nSize + 1); + Sequence<sal_Int8> aData(pBuffer.get(), nSize); Reference<XInputStream> aInputStream(new comphelper::SequenceInputStream(aData)); return xSvgParser->getDecomposition(aInputStream, aPath);
