[Libreoffice-commits] .: svx/inc svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 2 11:58:24 PDT 2012
svx/inc/svx/svdhdl.hxx | 2 +-
svx/source/svdraw/svdhdl.cxx | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 46aec3014b16286df97ed0c7a47f509fffb564c9
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Fri Nov 2 19:42:47 2012 +0100
Fix crash during polygon handle travelling.
Improving on 7d5922ca8f04604aba57708ee20fb4cdeaea2e44 wrt. bound
checking and non-truncation of index magic values.
Change-Id: If33495075472fdf242b2de0893fd44109ec7bc83
diff --git a/svx/inc/svx/svdhdl.hxx b/svx/inc/svx/svdhdl.hxx
index 3a44b92..10fcc84 100644
--- a/svx/inc/svx/svdhdl.hxx
+++ b/svx/inc/svx/svdhdl.hxx
@@ -480,7 +480,7 @@ public:
// 3.Level Position (x+y)
void Sort();
sal_uIntPtr GetHdlCount() const { return aList.size(); }
- SdrHdl* GetHdl(sal_uIntPtr nNum) const { return aList[nNum]; }
+ SdrHdl* GetHdl(sal_uIntPtr nNum) const { return nNum != CONTAINER_ENTRY_NOTFOUND ? aList[nNum] : NULL; }
sal_uIntPtr GetHdlNum(const SdrHdl* pHdl) const;
void SetHdlSize(sal_uInt16 nSiz);
sal_uInt16 GetHdlSize() const { return nHdlSize; }
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 7931db8..7b7548f 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -1911,7 +1911,7 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward)
}
// build new HdlNum
- sal_uInt32 nNewHdlNum(nNewHdl);
+ sal_uIntPtr nNewHdlNum(nNewHdl);
// look for old num in sorted array
if(nNewHdl != CONTAINER_ENTRY_NOTFOUND)
@@ -2020,7 +2020,7 @@ void SdrHdlList::SetHdlSize(sal_uInt16 nSiz)
nHdlSize = nSiz;
// propagate change to IAOs
- for(sal_uInt32 i=0; i<GetHdlCount(); i++)
+ for(sal_uIntPtr i=0; i<GetHdlCount(); i++)
{
SdrHdl* pHdl = GetHdl(i);
pHdl->Touch();
@@ -2036,7 +2036,7 @@ void SdrHdlList::SetMoveOutside(sal_Bool bOn)
bMoveOutside = bOn;
// propagate change to IAOs
- for(sal_uInt32 i=0; i<GetHdlCount(); i++)
+ for(sal_uIntPtr i=0; i<GetHdlCount(); i++)
{
SdrHdl* pHdl = GetHdl(i);
pHdl->Touch();
More information about the Libreoffice-commits
mailing list