summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-20 21:34:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-21 20:14:09 +0200
commitaacbb8bac09409d5a7d31dd8278dd495a0557a49 (patch)
tree7901cd95a455a993cf0c8e50e3be04d4b8897684 /io
parent562765f8cc3b9dc625a0d7b9304f98c2c01e63c1 (diff)
pvs-studio: V557 Array overrun is possible
Change-Id: Ia4a7c857b3c94490364ed979ba2fcb9e192e3796 Reviewed-on: https://gerrit.libreoffice.org/62111 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'io')
-rw-r--r--io/source/stm/odata.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index 6a62c75d5a63..f942c5d89ccd 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -1150,7 +1150,7 @@ Reference< XPersistObject > OObjectInputStream::readObject()
}
}
else {
- if( m_aPersistVector.size() < nId )
+ if (nId >= m_aPersistVector.size())
{
// id unknown, load failure !
bLoadSuccessful = false;