commit: 3d5e189f8ed0d703a60cf875d306c8eede3f1e9b
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 8 08:59:14 2017 +0000
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Sat Jul 8 09:13:45 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d5e189f
app-i18n/canna: fix buffer overflow
Gentoo-Bug: 341185
Package-Manager: Portage-2.3.6, Repoman-2.3.1
app-i18n/canna/canna-3.7_p3-r1.ebuild | 1 +
app-i18n/canna/canna-3.7_p3-r2.ebuild | 1 +
app-i18n/canna/canna-3.7_p3-r3.ebuild | 1 +
app-i18n/canna/files/canna-overflow.patch | 20 ++++++++++++++++++++
4 files changed, 23 insertions(+)
diff --git a/app-i18n/canna/canna-3.7_p3-r1.ebuild
b/app-i18n/canna/canna-3.7_p3-r1.ebuild
index 6a04c297b98..e38caaff6fb 100644
--- a/app-i18n/canna/canna-3.7_p3-r1.ebuild
+++ b/app-i18n/canna/canna-3.7_p3-r1.ebuild
@@ -24,6 +24,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}"/${PN}-gentoo.patch
"${FILESDIR}"/${PN}-kpdef.patch
+ "${FILESDIR}"/${PN}-overflow.patch
"${FILESDIR}"/${PN}-posix-sort.patch
"${FILESDIR}"/${PN}-Wformat.patch
"${FILESDIR}"/${PN}-Wformat-security.patch
diff --git a/app-i18n/canna/canna-3.7_p3-r2.ebuild
b/app-i18n/canna/canna-3.7_p3-r2.ebuild
index f6c43bc73d8..a06d55f21d7 100644
--- a/app-i18n/canna/canna-3.7_p3-r2.ebuild
+++ b/app-i18n/canna/canna-3.7_p3-r2.ebuild
@@ -29,6 +29,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}"/${PN}-gentoo.patch
"${FILESDIR}"/${PN}-kpdef.patch
+ "${FILESDIR}"/${PN}-overflow.patch
"${FILESDIR}"/${PN}-posix-sort.patch
"${FILESDIR}"/${PN}-Wformat.patch
"${FILESDIR}"/${PN}-Wformat-security.patch
diff --git a/app-i18n/canna/canna-3.7_p3-r3.ebuild
b/app-i18n/canna/canna-3.7_p3-r3.ebuild
index bb324c8e8ea..8dbf091e2dd 100644
--- a/app-i18n/canna/canna-3.7_p3-r3.ebuild
+++ b/app-i18n/canna/canna-3.7_p3-r3.ebuild
@@ -35,6 +35,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-gentoo.patch
"${FILESDIR}"/${PN}-canuum.patch
"${FILESDIR}"/${PN}-kpdef.patch
+ "${FILESDIR}"/${PN}-overflow.patch
"${FILESDIR}"/${PN}-posix-sort.patch
"${FILESDIR}"/${PN}-Wformat.patch
"${FILESDIR}"/${PN}-Wformat-security.patch
diff --git a/app-i18n/canna/files/canna-overflow.patch
b/app-i18n/canna/files/canna-overflow.patch
new file mode 100644
index 00000000000..ef3b6ad1b95
--- /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."),