diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-10 00:49:49 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-10 06:22:53 +0200 |
commit | 541ddf4580cac8c3f9590be26a487f5fc8e2553c (patch) | |
tree | e57f56779a817fd2ff164a51d5acca0578d19089 /connectivity | |
parent | 96d1240adf946c443fb2c369a1c84e31e259c7a8 (diff) |
tdf#120129: don't forget to update buffer size to actual length
Otherwise extra bytes get written to the resulting string from the
too long buffer.
Change-Id: Iccde16b8002f214df6f86f484f288ec464c6b674
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121872
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/firebird/Blob.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx index d254ba49431a..edcc0d233989 100644 --- a/connectivity/source/drivers/firebird/Blob.cxx +++ b/connectivity/source/drivers/firebird/Blob.cxx @@ -144,6 +144,9 @@ bool Blob::readOneSegment(uno::Sequence< sal_Int8 >& rDataOut) OUString sError(StatusVectorToString(m_statusVector, u"isc_get_segment")); throw IOException(sError, *this); } + + if (rDataOut.getLength() > nActualSize) + rDataOut.realloc(nActualSize); m_nBlobPosition += nActualSize; return aRet == isc_segstr_eof; // last segment read } |