PATH: add bounds check in word import

From: Robert Wilhelm <robert.wilhelm_at_gmx.net>
Date: Tue Sep 27 2005 - 19:37:42 CEST

This prevents an out of bounds access reported by valgrind.
See http://bugzilla.abisource.com/show_bug.cgi?id=9434 for details.

regards,
row

Index: ie_imp_MsWord_97.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp,v
retrieving revision 1.333
diff -u -r1.333 ie_imp_MsWord_97.cpp
--- ie_imp_MsWord_97.cpp 21 Aug 2005 17:48:27 -0000 1.333
+++ ie_imp_MsWord_97.cpp 27 Sep 2005 17:34:49 -0000
@@ -6093,7 +6093,7 @@

                // the current footnote will end at pos
                // f.txt_pos + f.txt_len,
- if(iDocPosition == m_pTextboxes[m_iNextTextbox].txt_pos
+
+ if( m_iNextTextbox < m_iTextboxCount && iDocPosition ==
m_pTextboxes[m_iNextTextbox].txt_pos +
                                   m_pTextboxes[m_iNextTextbox].txt_len)
                {
                        m_iNextTextbox++;

-- 
Robert Wilhelm <robert.wilhelm@gmx.net>
Received on Tue Sep 27 19:38:49 2005

This archive was generated by hypermail 2.1.8 : Tue Sep 27 2005 - 19:38:50 CEST