Commit 7fe3c755 authored by Frank Bossen's avatar Frank Bossen
Browse files

Fix issue reported by address sanitizer

The sanitizer reports that a call to getBrickIdxBsMap() tries
to access an out-of-bounds element. The size of the array
brickIdxBsMap[] is thus increased by 1 and its last element is
initialized to some large value
parent 36a7591e
......@@ -471,11 +471,14 @@ void BrickMap::create( const SPS& sps, const PPS& pps )
numTileRows = pps.getNumTileRowsMinus1() + 1;
numTiles = numTileColumns * numTileRows;
const uint32_t numCtusInFrame = pcv->sizeInCtus;
const size_t numCtusInFrame = pcv->sizeInCtus;
brickIdxRsMap = new uint32_t[numCtusInFrame];
brickIdxBsMap = new uint32_t[numCtusInFrame];
ctuBsToRsAddrMap = new uint32_t[numCtusInFrame+1];
ctuRsToBsAddrMap = new uint32_t[numCtusInFrame+1];
brickIdxBsMap = new uint32_t[numCtusInFrame + 1];
ctuBsToRsAddrMap = new uint32_t[numCtusInFrame + 1];
ctuRsToBsAddrMap = new uint32_t[numCtusInFrame + 1];
brickIdxBsMap[numCtusInFrame] = ~0u; // Initialize last element to some large value
initBrickMap( sps, pps );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment