GNUAspell / aspell

http://aspell.net
GNU Lesser General Public License v2.1
235 stars 50 forks source link

Fix: Crash for Empty File and clean up temp file after Error #441

Closed aspell-helper closed 7 years ago

aspell-helper commented 15 years ago

Kevin Atkinson kevina\@sf created a bug report on 2008-07-15 06:58:10 UTC (Orig. from https://sourceforge.net/p/aspell/bugs/223)

Date: Tue, 15 Jul 2008 00:48:59 +0700 From: Slava Semushin To: Kevin Atkinson kevina@gnu.org Subject: [PATCH] Fix for crash in UTF8 locale

Hello!

aspell 0.60.5 crash in UTF8 locale when input file is empty.

Simple test case:

$ touch test.txt $ aspell -c test.txt

I made patch to fix this for ALT Linux users: https://bugzilla.altlinux.org/attachment.cgi?id=2701

This patch also allow don't leave empty temporary file when some error occurs.

aspell-helper commented 13 years ago

Kevin Atkinson kevina\@sf updated the issue on 2011-01-17 05:12:26 UTC

aspell-helper commented 13 years ago

Kevin Atkinson kevina\@sf updated the issue on 2011-01-17 05:12:37 UTC

aspell-helper commented 13 years ago

Kevin Atkinson kevina\@sf commented on 2011-01-17 05:32:57 UTC

The patch. aspell-empty-file.patch

aspell-helper commented 12 years ago

Kevin Atkinson kevina\@sf commented on 2011-06-26 06:44:39 UTC

I applied you patch for the empty file part.

As far as not leaving a temporary file I think its best not to create the file in the first place. Thus I moved the opening of the file to after the checks.

Patch attached as better-aspell-empty-file.patch.

Will be in Aspell 0.60.7 which I really hope to release in the next couple of weeks.

aspell-helper commented 12 years ago

Kevin Atkinson kevina\@sf updated the issue on 2011-06-26 06:44:40 UTC

aspell-helper commented 12 years ago

Kevin Atkinson kevina\@sf commented on 2011-06-26 06:45:25 UTC

better-aspell-empty-file.patch

aspell-helper commented 12 years ago

Kevin Atkinson kevina\@sf commented on 2011-07-04 11:52:54 UTC

This bug is now fixed (or patch applied) in Aspell 0.60.6.1 which is now Available.