Re: PATH: add bounds check in word import

From: Tomas Frydrych <tomasfrydrych_at_yahoo.co.uk>
Date: Tue Sep 27 2005 - 19:57:26 CEST

This is a good catch; please commit it. If you are at it, could you see
if there are not other cases of the same problem; the same handling is
done at least for endnotes and footnotes.

Many thanks,

Tomas

Robert Wilhelm wrote:
> 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++;
>

                
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
Received on Tue Sep 27 19:58:21 2005

This archive was generated by hypermail 2.1.8 : Tue Sep 27 2005 - 19:58:21 CEST