summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-i18n/freewnn/files/freewnn-Wformat-security.patch143
-rw-r--r--app-i18n/freewnn/freewnn-1.1.1_alpha22.ebuild5
2 files changed, 147 insertions, 1 deletions
diff --git a/app-i18n/freewnn/files/freewnn-Wformat-security.patch b/app-i18n/freewnn/files/freewnn-Wformat-security.patch
new file mode 100644
index 000000000000..b5b68314060d
--- /dev/null
+++ b/app-i18n/freewnn/files/freewnn-Wformat-security.patch
@@ -0,0 +1,143 @@
+--- a/Wnn/uum/jhlp.c
++++ b/Wnn/uum/jhlp.c
+@@ -1135,7 +1135,7 @@
+ else
+ {
+ signal (SIGCHLD, SIG_IGN);
+- printf (MSG_GET (3));
++ printf ("%s", MSG_GET (3));
+ /*
+ printf("\r\n£õ£õ£í¤ò½ª¤ï¤ê¤Þ¤¹¡£\r\n");
+ */
+@@ -1212,8 +1212,8 @@
+
+ if ((buf = (unsigned char *) malloc (maxchg * 4)) == NULL)
+ {
+- printf (MSG_GET (2));
+- printf (MSG_GET (3));
++ printf ("%s", MSG_GET (2));
++ printf ("%s", MSG_GET (3));
+ /*
+ printf("malloc ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡££õ£õ£í¤ò½ª¤ï¤ê¤Þ¤¹¡£\r\n");
+ */
+--- a/Wnn/uum/jis_in.c
++++ b/Wnn/uum/jis_in.c
+@@ -64,7 +64,7 @@
+
+ completely_start:
+ throw_c (0); /* ¥â¡¼¥Éɽ¼¨¤Î¸å¤Ë½Ð¤¹ */
+- printf (MSG_GET (6));
++ printf ("%s", MSG_GET (6));
+ /*
+ printf("JIS¥³¡¼¥É: ");
+ */
+--- a/Wnn/uum/jutil.c
++++ b/Wnn/uum/jutil.c
+@@ -489,7 +489,7 @@
+ /*
+ printf("Âþº£¡¢¼­½ñ¤òÆɤ߹þ¤ó¤Ç¤¤¤Þ¤¹¡£");
+ */
+- printf (MSG_GET (60));
++ printf ("%s", MSG_GET (60));
+ flush ();
+
+ if ((id = jl_dic_add (bun_data_, fname, hfname, 0, prio, rdonly, hrdonly, NULL, NULL, yes_or_no_or_newline, print_msg1)) == -1 && wnn_errorno != -1)
+@@ -571,7 +571,7 @@
+ int x;
+ throw_c (0);
+ clr_line ();
+- printf (string);
++ printf ("%s", string);
+ flush ();
+ for (;;)
+ {
+--- a/Wnn/uum/kensaku.c
++++ b/Wnn/uum/kensaku.c
+@@ -112,7 +112,7 @@
+ u_s_on ();
+ w_printf (kana_buf, maxlength - strlen (MSG_GET (27)) - 2);
+ u_s_off ();
+- printf (MSG_GET (27));
++ printf ("%s", MSG_GET (27));
+ flush ();
+ keyin ();
+ return (NULL);
+--- a/Wnn/uum/kuten.c
++++ b/Wnn/uum/kuten.c
+@@ -63,7 +63,7 @@
+
+ completely_start:
+ throw_c (0); /* ¥â¡¼¥Éɽ¼¨¤Î¸å¤Ë½Ð¤¹ */
+- printf (MSG_GET (7));
++ printf ("%s", MSG_GET (7));
+ /*
+ printf("¶èÅÀ : ");
+ */
+--- a/Wnn/uum/prologue.c
++++ b/Wnn/uum/prologue.c
+@@ -144,7 +144,7 @@
+ /*
+ fprintf(stderr,"½é´ü²½¤ÇmallocÉÔǽ¡£\n");
+ */
+- fprintf (stderr, MSG_GET (2));
++ fprintf (stderr, "%s", MSG_GET (2));
+ return (-1);
+ }
+
+--- a/Wnn/uum/screen.c
++++ b/Wnn/uum/screen.c
+@@ -547,7 +547,7 @@
+ {
+ push_cursor ();
+ throw_c (0);
+- printf (msg);
++ printf ("%s", msg);
+ pop_cursor ();
+ flush ();
+ }
+--- a/Wnn/uum/sdefine.h
++++ b/Wnn/uum/sdefine.h
+@@ -191,8 +191,8 @@
+
+
+ #define flush() fflush(stdout)
+-#define print_msg(X) {push_cursor();throw_c(0); clr_line();printf(X);flush();pop_cursor();}
+-#define print_msg_getc(X) {push_cursor();throw_c(0); clr_line();printf(X);flush();keyin();pop_cursor();}
++#define print_msg(X) {push_cursor();throw_c(0); clr_line();printf("%s", X);flush();pop_cursor();}
++#define print_msg_getc(X) {push_cursor();throw_c(0); clr_line();printf("%s", X);flush();keyin();pop_cursor();}
+
+
+ #define UNDER_LINE_MODE (0x02 | 0x08 | 0x20)
+--- a/Wnn/uum/select_ele.c
++++ b/Wnn/uum/select_ele.c
+@@ -224,7 +224,7 @@
+
+ throw_c (0);
+ clr_line ();
+- printf (msg);
++ printf ("%s", msg);
+ for (k = dd[cc]; k < dd[cc + 1]; k++)
+ {
+ cp = findcp (k, cc);
+--- a/Wnn/uum/termio.c
++++ b/Wnn/uum/termio.c
+@@ -100,7 +100,7 @@
+
+ if ((strlen (Term_Name) > 2) && (strcmp (Term_Name + (strlen (Term_Name) - 2), "-j") == 0))
+ {
+- fprintf (stderr, MSG_GET (4));
++ fprintf (stderr, "%s", MSG_GET (4));
+ /*
+ fprintf(stderr,"Uum:£õ£õ£í¤«¤é£õ£õ£í¤Ï¤ª¤³¤»¤Þ¤»¤ó¡£\n");
+ */
+--- a/Wnn/uum/wnnrc_op.c
++++ b/Wnn/uum/wnnrc_op.c
+@@ -754,7 +754,7 @@
+ return fp;
+ }
+ error:
+- fprintf (stderr, MSG_GET (14));
++ fprintf (stderr, "%s", MSG_GET (14));
+ /*
+ fprintf(stderr , "uumrc ¥Õ¥¡¥¤¥ë¤¬¤¢¤ê¤Þ¤»¤ó¡£");
+ */
diff --git a/app-i18n/freewnn/freewnn-1.1.1_alpha22.ebuild b/app-i18n/freewnn/freewnn-1.1.1_alpha22.ebuild
index 39f27f3bf6a9..f4d5668b35ee 100644
--- a/app-i18n/freewnn/freewnn-1.1.1_alpha22.ebuild
+++ b/app-i18n/freewnn/freewnn-1.1.1_alpha22.ebuild
@@ -16,7 +16,10 @@ IUSE="ipv6"
S="${WORKDIR}/${MY_P}"
-PATCHES=( "${FILESDIR}"/${P}-parallel-build.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-parallel-build.patch
+ "${FILESDIR}"/${PN}-Wformat-security.patch
+)
DOCS="ChangeLog* CONTRIBUTORS"
src_prepare() {