Kaydet (Commit) 6daf1083 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1242875 Untrusted pointer write

Change-Id: I197a67320bd6cd8f0e6735b8cd24deebcdf190f1
üst 9785fd62
......@@ -696,7 +696,11 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
sal_uInt16 SfxItemPool::GetIndex_Impl(sal_uInt16 nWhich) const
{
assert(nWhich >= pImp->mnStart && nWhich <= pImp->mnEnd);
if (nWhich < pImp->mnStart || nWhich > pImp->mnEnd)
{
assert(false && "missing bounds check before use");
return 0;
}
return nWhich - pImp->mnStart;
}
......
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