Bug 53801 - aspell-0.50.5-r1 cannot create dictionaries
Bug#: 53801 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: major Priority: P2
Resolution: FIXED Assigned To: seemant@gentoo.org Reported By: tom@tomaw.net
Component: Applications
URL: 
Summary: aspell-0.50.5-r1 cannot create dictionaries
Keywords:  
Status Whiteboard: 
Opened: 2004-06-13 06:28 0000
Description:   Opened: 2004-06-13 06:28 0000
The english dictionary created with the above version contains only 271 words. 
0.50.0 works though.

Reproducible: Always
Steps to Reproduce:

------- Comment #1 From Adam Bregenzer 2004-06-14 14:31:26 0000 -------
I am having the same problem and after some investigation I found
word-list-compress to be the culprit.  Specifically, the
aspell-buffer-fix.patch patch applied to fix Bug 53389 is incorrect and instead
of fixing the security hole actually cripples world-list-compress.  Below is a
new patch that should correctly fix both bugs:

30a31,32
> #define WORD_BUFF_SIZE 256
>
43a46
>   int count = 0;
48c51,52
<   } while (c = getc(in), c != EOF && c > 32);
---
>     count++;
>   } while (c = getc(in), c != EOF && c > 32 && count < (WORD_BUFF_SIZE - 1));
64,65c68,69
<     char s1[256];
<     char s2[256];
---
>     char s1[WORD_BUFF_SIZE];
>     char s2[WORD_BUFF_SIZE];
92c96
<     char cur[256];
---
>     char cur[WORD_BUFF_SIZE];
103c107
<       while ((c = getc(stdin)) > 32)
---
>       while ((c = getc(stdin)) > 32 && i < (WORD_BUFF_SIZE - 1)) {
104a109
>       }


I have checked the resulting binary against the checks in Bug 53389 as well as
against the en-only.cwl in aspell-en-0.51-1.tar.bz2 and all behaves as
expected.

------- Comment #2 From Seemant Kulleen (RETIRED) 2004-06-16 10:34:07 0000 -------
thanks Adam, it's in portage with aspell-0.50.5-r2