aspell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [aspell-devel] Suggest modu Working class functions misuse ObjStack


From: Kevin Atkinson
Subject: Re: [aspell-devel] Suggest modu Working class functions misuse ObjStack buffer.
Date: Tue, 11 Jan 2005 13:56:07 -0700 (MST)

On Tue, 11 Jan 2005, Gary Setter wrote:

> In the suggest module, Wording class we use the  ObjStack buffer
> member to accumulate a suggestion (aka nearmiss). See functions
> form_word, try_word_n, and try_word_c. We append to buffer more
> then once. We assume that the size of the buffer is the end of
> the last memory location allocated minus the start of the first
> memory allocation. That will fail when one of the appends results
> in a reallocation due to exceeding the memory available in the
> current block.
> 
> I haven't desided what to do. I may suggest a patch that uses the
> String class to accumulate the suggestion, since ObjStack doesn't
> seem to be a good choice for the task at hand.

No need for anything that drastic.  Attached is a patch to fix the 
problem.

-- 
http://kevin.atkinson.dhs.org

Attachment: suggest-fix.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]