From 3fb5c11ac69e6687e579d4129cb892c5ae746a5e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 24 Jun 2020 18:24:37 +0200 Subject: fix JsonWriter::reallocBuffer was not updating mSpaceAllocated Change-Id: Ie5404e58c6520d32b72c19ddfa58b2ab2b895199 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97049 Tested-by: Jenkins Reviewed-by: Noel Grandin --- tools/source/misc/json_writer.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'tools') diff --git a/tools/source/misc/json_writer.cxx b/tools/source/misc/json_writer.cxx index 95c8b59e5d02..be891ef18423 100644 --- a/tools/source/misc/json_writer.cxx +++ b/tools/source/misc/json_writer.cxx @@ -320,6 +320,7 @@ void JsonWriter::reallocBuffer(int noMoreBytesRequired) free(mpBuffer); mpBuffer = pNew; mPos = mpBuffer + currentUsed; + mSpaceAllocated = newSize; } /** Hands ownership of the underlying storage buffer to the caller, -- cgit v1.2.3