Kaydet (Commit) 495412c7 authored tarafından Muhammet Kara's avatar Muhammet Kara Kaydeden (comit) Noel Grandin

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: 's avatarMuhammet Kara <muhammet.kara@pardus.org.tr>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 38898ffc
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <comphelper/simplefileaccessinteraction.hxx> #include <comphelper/simplefileaccessinteraction.hxx>
#define MAX_RESULTS 9 #define MAX_RESULTS 9
#define MAX_DEFAULT_PERSONAS 3
using namespace com::sun::star; using namespace com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -428,7 +429,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages() ...@@ -428,7 +429,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
sal_Int32 nIndex = 0; sal_Int32 nIndex = 0;
bool foundOne = false; bool foundOne = false;
while( aStream.IsOpen() && !aStream.eof() ) while( aStream.IsOpen() && !aStream.eof() && nIndex < MAX_DEFAULT_PERSONAS )
{ {
OString aLine; OString aLine;
aStream.ReadLine( aLine ); aStream.ReadLine( aLine );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment