diff options
author | David Tardon <dtardon@redhat.com> | 2011-05-12 14:18:45 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-05-12 14:32:30 +0200 |
commit | 27866e1a7c5d58f9516ff5a2b25e108f171adbd1 (patch) | |
tree | a216eff17eefd85753e88024c528a14ffa00529c /sfx2 | |
parent | a7aaa5b01a00a59c22c970a4447005f12b6fa7bb (diff) |
fix array overflow
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/bastyp/bitset.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx index 5b5ad21617..ef08bb5900 100644 --- a/sfx2/source/bastyp/bitset.cxx +++ b/sfx2/source/bastyp/bitset.cxx @@ -228,8 +228,8 @@ BitSet& BitSet::operator=( sal_uInt16 nBit ) sal_uIntPtr nBitVal = 1L << (nBit % 32); nCount = 1; - pBitmap = new sal_uIntPtr[nBlocks]; - memset( pBitmap + nBlocks, 0, 4 * nBlocks ); + pBitmap = new sal_uIntPtr[nBlocks + 1]; + memset( pBitmap, 0, 4 * (nBlocks + 1) ); *(pBitmap+nBlocks) = nBitVal; |