Kaydet (Commit) 4673bbef authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1242656 Untrusted loop bound

Change-Id: I1b06497065fa52b928f99c2955391af68f4ff1b7
üst 1f03a8d4
......@@ -4227,8 +4227,16 @@ void WW8RStyle::ImportOldFormatStyles()
sal_uInt16 nStyles=stcp;
std::vector<pxoffset> aCHPXOffsets(stcp);
size_t nMaxByteCount = rSt.remainingSize();
sal_uInt16 cbChpx(0);
rSt.ReadUInt16( cbChpx );
rSt.ReadUInt16(cbChpx);
if (cbPapx > nMaxByteCount)
{
SAL_WARN("sw.ww8", "WW8RStyle::ImportOldFormatStyles: truncating out of range "
<< cbPapx << " to " << nMaxByteCount);
cbPapx = nMaxByteCount;
}
nByteCount = 2;
stcp=0;
std::vector< std::vector<sal_uInt8> > aConvertedChpx;
......
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