summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2017-07-08 17:59:14 +0900
committerAkinori Hattori <hattya@gentoo.org>2017-07-08 18:13:45 +0900
commit3d5e189f8ed0d703a60cf875d306c8eede3f1e9b (patch)
tree1934cea52aa46621ab2e12e1f769f52d4fd47be1 /app-i18n/canna/files
parentapp-i18n/canna: fix build with -Werror=format-security (diff)
downloadgentoo-3d5e189f8ed0d703a60cf875d306c8eede3f1e9b.tar.gz
gentoo-3d5e189f8ed0d703a60cf875d306c8eede3f1e9b.tar.bz2
gentoo-3d5e189f8ed0d703a60cf875d306c8eede3f1e9b.zip
app-i18n/canna: fix buffer overflow
Gentoo-Bug: 341185 Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'app-i18n/canna/files')
-rw-r--r--app-i18n/canna/files/canna-overflow.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/app-i18n/canna/files/canna-overflow.patch b/app-i18n/canna/files/canna-overflow.patch
new file mode 100644
index 000000000000..ef3b6ad1b95d
--- /dev/null
+++ b/app-i18n/canna/files/canna-overflow.patch
@@ -0,0 +1,20 @@
+--- a/cmd/catdic/rutil.c
++++ b/cmd/catdic/rutil.c
+@@ -384,7 +384,7 @@
+ (void)fprintf(stderr,gettxt("cannacmd:205",
+ "Specified dictionary \"%s\" already exists. Do you overwrite it ? (y/n)"),
+ dicname);
+- fgets(ans,80,stdin);
++ fgets(ans,sizeof(ans),stdin);
+ } else {
+ (void)fprintf(stderr,gettxt("cannacmd:206",
+ "Specified dictionary \"%s\" already exists."),dicname);
+@@ -474,7 +474,7 @@
+ if (isatty(fileno(stdin)) != 0) {
+ (void)fprintf(stderr,gettxt("cannacmd:216",
+ "Personal learning file of dictionary \"%s\" exists. Do you overwrite it ? (y/n)"),dicname);
+- fgets(ans,80,stdin);
++ fgets(ans,sizeof(ans),stdin);
+ } else {
+ (void)fprintf(stderr,gettxt("cannacmd:217",
+ "Personal learning file of system dictionary \"%s\" already exists."),