From 1075a244e5aafba657abaf0f87b0d2f69c2b77b5 Mon Sep 17 00:00:00 2001 From: tommat Date: Tue, 31 Aug 2004 11:41:21 +0000 Subject: [PATCH] - upgraded for version 0.60 (this bug seems to be fixed in this rel.) Changed files: aspell-buffer-fix.patch -> 1.2 --- aspell-buffer-fix.patch | 68 +++-------------------------------------- 1 file changed, 4 insertions(+), 64 deletions(-) diff --git a/aspell-buffer-fix.patch b/aspell-buffer-fix.patch index c0b0de6..75365ae 100644 --- a/aspell-buffer-fix.patch +++ b/aspell-buffer-fix.patch @@ -1,71 +1,11 @@ -diff -urN aspell-0.50.5/prog/compress.c aspell-0.50.5.new/prog/compress.c ---- aspell-0.50.5/prog/compress.c 2002-08-31 11:51:11.000000000 -0700 -+++ aspell-0.50.5.new/prog/compress.c 2004-06-16 10:14:42.000000000 -0700 -@@ -28,6 +28,11 @@ - - #endif - -+#define WORD_BUFF_SIZE 256 -+ -+int count = 0; -+ -+ - void usage () - { - fputs("Compresses or uncompresses sorted word lists.\n" , stderr); -@@ -45,8 +50,9 @@ - if (c == EOF) return 0; - do { - *w++ = (char)(c); -- } while (c = getc(in), c != EOF && c > 32); -+ } while (c = getc(in), c != EOF && c > 32 && count < (WORD_BUFF_SIZE - 1)); - *w = '\0'; -+ count++; - ungetc(c, in); - if (c == EOF) return 0; - else return 1; -@@ -61,14 +67,15 @@ - - } else if (argv[1][0] == 'c') { - -- char s1[256]; -- char s2[256]; -+ char s1[WORD_BUFF_SIZE]; -+ char s2[WORD_BUFF_SIZE]; - char * prev = s2; - char * cur = s1; - *prev = '\0'; - - SETBIN (stdout); - -+ while (count < WORD_BUFF_SIZE) { - while (get_word(stdin, cur)) { - int i = 0; - /* get the length of the prefix */ -@@ -85,11 +92,12 @@ - prev = s2; cur = s1; - } - } -+ } - return 0; +--- aspell-0.60/prog/compress.c.orig 2004-08-31 12:57:35.925151752 +0200 ++++ aspell-0.60/prog/compress.c 2004-08-31 13:06:28.722154296 +0200 +@@ -93,7 +93,7 @@ } else if (argv[1][0] == 'd') { - char cur[256]; -+ char cur[WORD_BUFF_SIZE]; ++ char cur[BUFSIZE]; int i; int c; -@@ -100,8 +108,11 @@ - if (i == 0) - i = getc(stdin); - --i; -- while ((c = getc(stdin)) > 32) -+ while ((c = getc(stdin)) > 32 && i < (WORD_BUFF_SIZE -1)) { - cur[i++] = (char)c; -+ count++; -+ } -+ - cur[i] = '\0'; - fputs(cur, stdout); - putc('\n', stdout); -- 2.44.0