diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-12 12:46:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-12 12:46:50 +0000 |
commit | 6daf1083c2e4c0273449430db05ef8aba9648248 (patch) | |
tree | 601ea0046bddf45dd5c5b72813f2ef6ee151fa09 /svl | |
parent | 9785fd625f4799019ee0fb52868321b177526497 (diff) |
coverity#1242875 Untrusted pointer write
Change-Id: I197a67320bd6cd8f0e6735b8cd24deebcdf190f1
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/poolio.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index 66f5ed72fa60..1ccba9060d73 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -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; } |