[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 31 10:31:21 UTC 2021
vcl/source/filter/ipcx/ipcx.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit a58b9010b38ca43d4b3a2b30fcd6bec28db1b344
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 30 15:37:20 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 31 12:30:46 2021 +0200
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I63ce4b9a49988736fd6d602a49dd54495863faec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121353
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/filter/ipcx/ipcx.cxx b/vcl/source/filter/ipcx/ipcx.cxx
index 413ba95f4256..b1162d5ec409 100644
--- a/vcl/source/filter/ipcx/ipcx.cxx
+++ b/vcl/source/filter/ipcx/ipcx.cxx
@@ -215,11 +215,11 @@ void PCXReader::ImplReadBody()
std::unique_ptr<sal_uInt8[]> pPlane[ 4 ];
sal_uInt8 * pDest;
sal_uInt32 i, ny, nLastPercent = 0, nPercent;
- sal_uInt16 nCount, nx, np;
+ sal_uInt16 nCount, nx;
sal_uInt8 nDat = 0, nCol = 0;
- for( np = 0; np < nPlanes; np++ )
- pPlane[ np ].reset(new sal_uInt8[ nBytesPerPlaneLin ]);
+ for (sal_uInt16 np = 0; np < nPlanes; ++np)
+ pPlane[np].reset(new sal_uInt8[nBytesPerPlaneLin]());
nCount = 0;
for ( ny = 0; ny < nHeight; ny++ )
@@ -234,7 +234,7 @@ void PCXReader::ImplReadBody()
{
nLastPercent = nPercent;
}
- for ( np = 0; np < nPlanes; np++)
+ for (sal_uInt16 np = 0; np < nPlanes; ++np)
{
if ( nEncoding == 0)
m_rPCX.ReadBytes( static_cast<void *>(pPlane[ np ].get()), nBytesPerPlaneLin );
More information about the Libreoffice-commits
mailing list