Re: Memory overrun bug in aspell 0.60's String class

Kevin Atkinson <[email protected]>
Newsgroups gmane.comp.gnu.aspell.devel
Message-ID <Pine.LNX.4.44.0410110618380.1689-100000@kevin-p3.atkinson.dhs.org>
On Mon, 6 Sep 2004, Brett Wilson wrote:

> I've discovered a bug in the memory allocation of the String class.
> ...
> What was really meant was:
> 
>     if (new_size - 1 < s) new_size = s + 1;

Fixed.

> Also, in String operator+ (string.hpp:397) the names of the two
> arguments are switched. The function works correctly, as the names are
> used consistently wrong, but I was pretty confused when I stepped
> through this function while tracking down the above error. I take
> 'lhs' and 'rhs' to mean "Left/Right Hand Side", but 'rhs' actually
> ends up on the left side of the concatenated string.

Fixed.

Sorry for the delay. I almost forgot about it.  In the future it is best 
to submit a patch (or bug report) using the tracker so I don't forget 
about it.

-- 
http://kevin.atkinson.dhs.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.