Author: hdu
Date: Thu Oct 10 09:20:38 2013
New Revision: 1530891

URL: http://svn.apache.org/r1530891
Log:
#i123409# prevent invalid iterator dereference in 
SwTaggedPDFHelper::CheckReopenTag()

Found by: potassium19
Patch by: h...@apache.org
Review by: o...@apache.org

Modified:
    openoffice/trunk/main/sw/source/core/text/EnhancedPDFExportHelper.cxx

Modified: openoffice/trunk/main/sw/source/core/text/EnhancedPDFExportHelper.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/text/EnhancedPDFExportHelper.cxx?rev=1530891&r1=1530890&r2=1530891&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/text/EnhancedPDFExportHelper.cxx 
(original)
+++ openoffice/trunk/main/sw/source/core/text/EnhancedPDFExportHelper.cxx Thu 
Oct 10 09:20:38 2013
@@ -375,8 +375,9 @@ bool SwTaggedPDFHelper::CheckReopenTag()
             if ( pKey )
             {
                 FrmTagIdMap& rFrmTagIdMap = 
SwEnhancedPDFExportHelper::GetFrmTagIdMap();
-                const FrmTagIdMap::const_iterator aIter =  rFrmTagIdMap.find( 
pKey );
-                nReopenTag = (*aIter).second;
+                const FrmTagIdMap::const_iterator aIter = rFrmTagIdMap.find( 
pKey );
+                if( aIter != rFrmTagIdMap.end())
+                    nReopenTag = (*aIter).second;
             }
         }
     }


Reply via email to