Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Fixed potential crash with frmContactEditorXToken in Edit mode.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 10 Feb 2016 01:52:44 +0000 (01:52 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 10 Feb 2016 01:52:44 +0000 (01:52 +0000)
This would be caused because no checks were made on the iterator to see
if it was valid or not.

source/contacteditor/frmContactEditorXToken.cpp

index e323fa5..1e12de9 100644 (file)
@@ -118,7 +118,8 @@ void frmContactEditorXToken::SetEditorMode(bool EditMode)
                
                striter = XTokenListTokensPtr->find(XTokenListIndex);
                 
-               if (striter->first == XTokenListIndex){
+               if (striter->first == XTokenListIndex &&
+                       striter != XTokenListTokensPtr->end()){
                
                        strValue = striter->second;
                
@@ -132,7 +133,8 @@ void frmContactEditorXToken::SetEditorMode(bool EditMode)
 
                striter = XTokenListPtr->find(XTokenListIndex);
                 
-               if (striter->first == XTokenListIndex){
+               if (striter->first == XTokenListIndex &&
+                       striter != XTokenListPtr->end()){
                
                        strValue = striter->second;
                
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy