[Libreoffice-commits] core.git: cui/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Sep 20 07:53:16 UTC 2018
cui/source/options/personalization.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 495412c74f52957dd3941970bf34928d069e0dc3
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
AuthorDate: Fri Sep 14 14:56:01 2018 +0300
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Sep 20 09:52:50 2018 +0200
Do not crash when there are more default personas than intended
Change-Id: I516607375b2f296e562bb378e5051303cd27055b
Reviewed-on: https://gerrit.libreoffice.org/60492
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara at pardus.org.tr>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 4baac93ec917..9c4178d0b987 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -39,6 +39,7 @@
#include <comphelper/simplefileaccessinteraction.hxx>
#define MAX_RESULTS 9
+#define MAX_DEFAULT_PERSONAS 3
using namespace com::sun::star;
using namespace ::com::sun::star::uno;
@@ -428,7 +429,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
sal_Int32 nIndex = 0;
bool foundOne = false;
- while( aStream.IsOpen() && !aStream.eof() )
+ while( aStream.IsOpen() && !aStream.eof() && nIndex < MAX_DEFAULT_PERSONAS )
{
OString aLine;
aStream.ReadLine( aLine );
More information about the Libreoffice-commits
mailing list