[Libreoffice-commits] core.git: vcl/source
Julien Nabet
serval2412 at yahoo.fr
Wed Oct 25 05:03:57 UTC 2017
vcl/source/edit/texteng.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit f49ba490a566225d2c6b3925cfe39756a01625ba
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Tue Oct 24 23:54:06 2017 +0200
tdf#113400: fix crash by destroying returned unique_ptr
Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=19910c461230f70bb9e98ad44db3525f0d755724
tdf#112658: fix leak when calling TextEngine::SetAttrib
Change-Id: I4f1edf41e11f3cdfda6071b30a84372db68cd59d
Reviewed-on: https://gerrit.libreoffice.org/43795
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index e1a6f6644626..d7e90cd555e9 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -2494,7 +2494,10 @@ void TextEngine::RemoveAttribs( sal_uInt32 nPara, sal_uInt16 nWhich )
for(sal_uInt16 nAttr = rAttribs.Count(); nAttr; --nAttr)
{
if(rAttribs.GetAttrib( nAttr - 1 ).Which() == nWhich)
- rAttribs.RemoveAttrib( nAttr -1 );
+ {
+ // tdf#113400 destroy unique_ptr returned
+ rAttribs.RemoveAttrib( nAttr -1 ).reset();
+ }
}
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0 );
More information about the Libreoffice-commits
mailing list