File stardict-tools-3.0.1-destbufferoverflow.patch of Package stardict-tools

Index: stardict-tools-3.0.1/src/myspell2dic.c
===================================================================
--- stardict-tools-3.0.1.orig/src/myspell2dic.c
+++ stardict-tools-3.0.1/src/myspell2dic.c
@@ -132,7 +132,7 @@ if (argc<3)
 
 fprintf(stderr, "Enter grammar language [Spanish]: ");
 fflush(stderr);
-fgets(lang, 100, stdin);
+fgets(lang, 50, stdin);
 if ((p=strchr(lang, '\n'))!=NULL) *p=0;
 if (*lang==0) strcpy(lang, "Spanish");
 
Index: stardict-tools-3.0.1/src/ooo2dict.c
===================================================================
--- stardict-tools-3.0.1.orig/src/ooo2dict.c
+++ stardict-tools-3.0.1/src/ooo2dict.c
@@ -71,7 +71,7 @@ current2=malloc(10000);
 
 fprintf(stderr, "Enter thesaurus language [WordNet_English]: ");
 fflush(stderr);
-fgets(lang, 100, stdin);
+fgets(lang, 50, stdin);
 if ((p=strchr(lang, '\n'))!=NULL) *p=0;
 if (*lang==0) strcpy(lang, "WordNet_English");
 F=fopen((argc>1)? argv[1]: "/usr/share/myspell/dicts/th_en_US_v2.dat", "rt");
openSUSE Build Service is sponsored by