diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-30 15:37:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-31 12:30:46 +0200 |
commit | a58b9010b38ca43d4b3a2b30fcd6bec28db1b344 (patch) | |
tree | 500f797a3e59a13fcee34c26b661e744a6eebcb1 /vcl | |
parent | 0ec44b738b92bbf6965bf0dbe41199476673dcaf (diff) |
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I63ce4b9a49988736fd6d602a49dd54495863faec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121353
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/ipcx/ipcx.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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 ); |