Re: patch#3: intermittent crasher bug


Subject: Re: patch#3: intermittent crasher bug
From: Dom Lachowicz (cinamod@hotmail.com)
Date: Mon Apr 09 2001 - 14:58:30 CDT


I'm hesitant to commit this code. I've pasted large amounts of formatted
text into my doc repeatedly and can't reproduce this.

Can you do one/more of the following for me:
1) Tell me how to reproduce the bug more accurately/in more depth
2) Provide a backtrace of say the last 10 commands

Dom

>From: Patrick Lam <plam@plam.lcs.mit.edu>
>To: abiword-dev@abisource.com
>Subject: patch#3: intermittent crasher bug
>Date: Sun, 8 Apr 2001 21:42:58 -0400 (EDT)
>
>If you repeatedly paste something, AbiWord tends to eventually segfault.
>That's not cool at all. I think this is because the buffer is allocated
>with one byte too little: no memory is allocated for the trailing zero.
>Here's a patch to ie_exp::writeFile.
>
>pat
>
>Index: src/wp/impexp/xp/ie_exp.cpp
>===================================================================
>RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_exp.cpp,v
>retrieving revision 1.37
>diff -u -r1.37 ie_exp.cpp
>--- src/wp/impexp/xp/ie_exp.cpp 2001/03/29 17:37:02 1.37
>+++ src/wp/impexp/xp/ie_exp.cpp 2001/04/09 01:22:24
>@@ -236,8 +237,13 @@
>
> m_pDocRange = pDocRange;
> m_pByteBuf = pBuf;
>+
>+ UT_Error err = _writeDocument();
>+
>+ // write trailing zero to byte buffer (not required for file)
>+ write("",1);
>
>- return _writeDocument();
>+ return err;
> }
>
> //////////////////////////////////////////////////////////////////
>
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com



This archive was generated by hypermail 2b25 : Mon Apr 09 2001 - 14:58:34 CDT