[Libreoffice-commits] core.git: 2 commits - sw/source vcl/source
Caolán McNamara
caolanm at redhat.com
Wed Oct 15 05:49:40 PDT 2014
sw/source/core/doc/doclay.cxx | 7 +------
vcl/source/control/edit.cxx | 2 +-
2 files changed, 2 insertions(+), 7 deletions(-)
New commits:
commit e45136f1ff9d817dfec27a6a20ba29fffc6c54bf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 15 13:47:09 2014 +0100
Resolves: fdo#85032 max len property of -1 -> crash
Change-Id: Ief903c619204f01784e93fd5e2d582632cef032e
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index dc345d2..4ca22e3 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2468,7 +2468,7 @@ bool Edit::IsInsertMode() const
void Edit::SetMaxTextLen(sal_Int32 nMaxLen)
{
- mnMaxTextLen = nMaxLen ? nMaxLen : EDIT_NOLIMIT;
+ mnMaxTextLen = nMaxLen > 0 ? nMaxLen : EDIT_NOLIMIT;
if ( mpSubEdit )
mpSubEdit->SetMaxTextLen( mnMaxTextLen );
commit 3d0988b8ca11eb8e80a3eae5f033512fb9bab0ce
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 15 09:25:55 2014 +0100
coverity#982478 Dereference after null check
maybe sort of can be considered a regression from
commit 733b831970204059b9d89eff203551d6d3bf4bbe
Date: Tue Jan 5 16:37:41 2010 +0100
swunolocking1: swtypes.hxx: rename frame anchor types
enum RndStdIds: rename frame anchor types (FLY_*) to be more intuitive.
where
if (0 == (pAnchorPos = pAnch->GetCntntAnchor()))
bCallMake = sal_False;
turned to
if (pAnchorPos)
bCallMake = sal_False;
but there would always be a following de-ref of a potential NULL pAnchorPos
which wasn't FLY_AT_PAGE
Change-Id: I808b4f178887ab6149e38bab6e36eb68d7a1eb29
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 865324a..288ba1f 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -304,7 +304,6 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
SwFrmFmt* pFrmFmt, bool bCalledFromShell )
{
SwFlyFrmFmt* pFmt = 0;
- bool bCallMake = true;
if ( !pAnchorPos && (FLY_AT_PAGE != eAnchorType) )
{
const SwFmtAnchor* pAnch;
@@ -316,15 +315,11 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
if ( (FLY_AT_PAGE != pAnch->GetAnchorId()) )
{
pAnchorPos = pAnch->GetCntntAnchor();
- if (pAnchorPos)
- {
- bCallMake = false;
- }
}
}
}
- if( bCallMake )
+ if (pAnchorPos)
{
if( !pFrmFmt )
pFrmFmt = getIDocumentStylePoolAccess().GetFrmFmtFromPool( RES_POOLFRM_FRAME );
More information about the Libreoffice-commits
mailing list