diff options
author | Seemant Kulleen <seemant@gentoo.org> | 2004-06-16 17:33:41 +0000 |
---|---|---|
committer | Seemant Kulleen <seemant@gentoo.org> | 2004-06-16 17:33:41 +0000 |
commit | 4a7e64ba2dd569ef98be1ac49a08fce48be896d6 (patch) | |
tree | 70c1c7f0e68d34e7fbf6e2b4515e524887e7ec17 /app-text/aspell/files/aspell-buffer-fix.patch | |
parent | version bump, thanks to Scott Shawcroft <shux_linux@comcast.net> (#53153) (Ma... (diff) | |
download | gentoo-2-4a7e64ba2dd569ef98be1ac49a08fce48be896d6.tar.gz gentoo-2-4a7e64ba2dd569ef98be1ac49a08fce48be896d6.tar.bz2 gentoo-2-4a7e64ba2dd569ef98be1ac49a08fce48be896d6.zip |
fix for the patch, only stable is the -r2 which forces the new fixed patched
Diffstat (limited to 'app-text/aspell/files/aspell-buffer-fix.patch')
-rw-r--r-- | app-text/aspell/files/aspell-buffer-fix.patch | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/app-text/aspell/files/aspell-buffer-fix.patch b/app-text/aspell/files/aspell-buffer-fix.patch index cf43e7b9d56c..c0b0de6be0e5 100644 --- a/app-text/aspell/files/aspell-buffer-fix.patch +++ b/app-text/aspell/files/aspell-buffer-fix.patch @@ -1,33 +1,48 @@ -diff -urN aspell-0.50.5.orig/prog/compress.c aspell-0.50.5/prog/compress.c ---- aspell-0.50.5.orig/prog/compress.c 2002-08-31 11:51:11.000000000 -0700 -+++ aspell-0.50.5/prog/compress.c 2004-06-09 13:11:46.000000000 -0700 -@@ -28,6 +28,9 @@ +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 -+int count; ++#define WORD_BUFF_SIZE 256 ++ ++int count = 0; + + void usage () { fputs("Compresses or uncompresses sorted word lists.\n" , stderr); -@@ -47,6 +50,7 @@ +@@ -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); ++ } 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; -@@ -69,6 +73,7 @@ +@@ -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 < 256) { ++ while (count < WORD_BUFF_SIZE) { while (get_word(stdin, cur)) { int i = 0; /* get the length of the prefix */ -@@ -85,6 +90,7 @@ +@@ -85,11 +92,12 @@ prev = s2; cur = s1; } } @@ -35,12 +50,18 @@ diff -urN aspell-0.50.5.orig/prog/compress.c aspell-0.50.5/prog/compress.c return 0; } else if (argv[1][0] == 'd') { -@@ -100,8 +106,11 @@ + +- char cur[256]; ++ char cur[WORD_BUFF_SIZE]; + 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 && count < 256) { ++ while ((c = getc(stdin)) > 32 && i < (WORD_BUFF_SIZE -1)) { cur[i++] = (char)c; + count++; + } |