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
parentapp-i18n/canna: fix build with -Werror=format-security (diff)
downloadgentoo-3d5e189f.tar.gz
gentoo-3d5e189f.tar.bz2
gentoo-3d5e189f.zip
app-i18n/canna: fix buffer overflow
Gentoo-Bug: 341185 Package-Manager: Portage-2.3.6, Repoman-2.3.1
-rw-r--r--app-i18n/canna/canna-3.7_p3-r1.ebuild1
-rw-r--r--app-i18n/canna/canna-3.7_p3-r2.ebuild1
-rw-r--r--app-i18n/canna/canna-3.7_p3-r3.ebuild1
-rw-r--r--app-i18n/canna/files/canna-overflow.patch20
4 files changed, 23 insertions, 0 deletions
diff --git a/app-i18n/canna/canna-3.7_p3-r1.ebuild b/app-i18n/canna/canna-3.7_p3-r1.ebuild
index 6a04c297b980..e38caaff6fb5 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 f6c43bc73d8e..a06d55f21d76 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 bb324c8e8ea5..8dbf091e2dd8 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 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."),