commit:     c88993e713f214c28fb151d8fb05a1425cc13ce5
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  8 08:54:52 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=c88993e7

app-i18n/canna: fix build with -Werror=format-security

Gentoo-Bug: 521054

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-Wformat-security.patch | 199 ++++++++++++++++++++++
 4 files changed, 202 insertions(+)

diff --git a/app-i18n/canna/canna-3.7_p3-r1.ebuild 
b/app-i18n/canna/canna-3.7_p3-r1.ebuild
index 97dee1123ab..6a04c297b98 100644
--- a/app-i18n/canna/canna-3.7_p3-r1.ebuild
+++ b/app-i18n/canna/canna-3.7_p3-r1.ebuild
@@ -26,6 +26,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-kpdef.patch
        "${FILESDIR}"/${PN}-posix-sort.patch
        "${FILESDIR}"/${PN}-Wformat.patch
+       "${FILESDIR}"/${PN}-Wformat-security.patch
 )
 DOCS="*CHANGES* ChangeLog INSTALL* README* RKCCONF* WHATIS*"
 

diff --git a/app-i18n/canna/canna-3.7_p3-r2.ebuild 
b/app-i18n/canna/canna-3.7_p3-r2.ebuild
index 2236655f622..f6c43bc73d8 100644
--- a/app-i18n/canna/canna-3.7_p3-r2.ebuild
+++ b/app-i18n/canna/canna-3.7_p3-r2.ebuild
@@ -31,6 +31,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-kpdef.patch
        "${FILESDIR}"/${PN}-posix-sort.patch
        "${FILESDIR}"/${PN}-Wformat.patch
+       "${FILESDIR}"/${PN}-Wformat-security.patch
 )
 DOCS="*CHANGES* ChangeLog INSTALL* README* RKCCONF* WHATIS*"
 

diff --git a/app-i18n/canna/canna-3.7_p3-r3.ebuild 
b/app-i18n/canna/canna-3.7_p3-r3.ebuild
index d794f10e8ed..bb324c8e8ea 100644
--- a/app-i18n/canna/canna-3.7_p3-r3.ebuild
+++ b/app-i18n/canna/canna-3.7_p3-r3.ebuild
@@ -37,6 +37,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-kpdef.patch
        "${FILESDIR}"/${PN}-posix-sort.patch
        "${FILESDIR}"/${PN}-Wformat.patch
+       "${FILESDIR}"/${PN}-Wformat-security.patch
 )
 DOCS="*CHANGES* ChangeLog INSTALL* README* RKCCONF* WHATIS*"
 

diff --git a/app-i18n/canna/files/canna-Wformat-security.patch 
b/app-i18n/canna/files/canna-Wformat-security.patch
new file mode 100644
index 00000000000..c83552b5cba
--- /dev/null
+++ b/app-i18n/canna/files/canna-Wformat-security.patch
@@ -0,0 +1,199 @@
+--- a/cmd/catdic/can.c
++++ b/cmd/catdic/can.c
+@@ -1236,7 +1236,7 @@
+       break;
+       default:
+       if (init[0] == '/') {
+-          (void)fprintf(stderr,msg_abnl);
++          (void)fprintf(stderr,"%s",msg_abnl);
+       } else {
+           (void)fprintf(stderr,msg_abnls,init);
+       }
+@@ -1297,11 +1297,11 @@
+ 
+     if ( opt_fq ) {
+       if ( opt_s ) {
+-        (void) fprintf(stderr,msg_sfq);
++        (void) fprintf(stderr,"%s",msg_sfq);
+         exit(ERR_VALUE) ;
+       }  
+       if ( opt_l || opt_std ) {
+-        (void) fprintf(stderr,msg_l);
++        (void) fprintf(stderr,"%s",msg_l);
+         exit(ERR_VALUE) ;
+       }
+       mode = mode | PL_DIC ;
+@@ -1491,7 +1491,7 @@
+     break;
+   default:
+     if(init[0] == '/') {
+-      fprintf(stderr,msg_abnl );
++      fprintf(stderr,"%s",msg_abnl );
+     }
+     else {
+       fprintf(stderr,msg_abnls,init);
+--- a/cmd/catdic/rutil.c
++++ b/cmd/catdic/rutil.c
+@@ -271,7 +271,7 @@
+        "Dictionary \"%s\" does not exist.\n"), dicname);
+     break;
+   case NOTALC :
+-    (void)fprintf(stderr, msg_mem);
++    (void)fprintf(stderr, "%s", msg_mem);
+     break;
+   case BADF :
+     (void)fprintf(stderr, gettxt("cannacmd:196",
+@@ -297,7 +297,7 @@
+       (void)fprintf(stderr,msg_abnls,init);
+     }
+     else {
+-      (void)fprintf(stderr,msg_abnl);
++      (void)fprintf(stderr,"%s",msg_abnl);
+     }
+     break;
+   }
+@@ -321,7 +321,7 @@
+       (void)fprintf(stderr, msg_abnls, init);
+     }
+     else {
+-      (void)fprintf(stderr, msg_abnl);
++      (void)fprintf(stderr, "%s", msg_abnl);
+     }
+     ret = -1;
+     return ret;
+@@ -332,13 +332,13 @@
+         (void)fprintf(stderr, msg_mnts, init);
+       }
+       else {
+-        (void)fprintf(stderr, msg_mnt);
++        (void)fprintf(stderr, "%s", msg_mnt);
+       }
+       ret = -1;
+       return ret;
+     }
+     if ((mode & PL_DIC) == PL_DIC ) {
+-      (void)fprintf(stderr,msg_fq);
++      (void)fprintf(stderr,"%s",msg_fq);
+       ret = -1 ;
+       return ret ;
+     }
+@@ -359,7 +359,7 @@
+     ret = 0;
+     break;
+   case NOTALC :
+-    (void)fprintf(stderr, msg_mem);
++    (void)fprintf(stderr, "%s", msg_mem);
+     ret = -1;
+     break;
+   case BADF :
+@@ -421,7 +421,7 @@
+     ret = -1;
+     break;
+   case BADCONT :
+-    (void)fprintf(stderr,msg_cnt);
++    (void)fprintf(stderr,"%s",msg_cnt);
+     ret = -1;
+     break;
+   default:
+@@ -429,7 +429,7 @@
+       (void)fprintf(stderr, msg_abnls, init);
+     }
+     else {
+-      (void)fprintf(stderr, msg_abnl);
++      (void)fprintf(stderr, "%s", msg_abnl);
+     }
+     exit(ERR_VALUE);
+     break;
+@@ -448,7 +448,7 @@
+     ret = 0;
+     break;
+   case NOTALC :
+-    (void)fprintf(stderr, msg_mem);
++    (void)fprintf(stderr, "%s", msg_mem);
+     ret = -1;
+     break;
+   case BADF :
+@@ -509,11 +509,11 @@
+     ret = -1;
+     break;
+   case BADARG :
+-    (void)fprintf(stderr,msg_fq);
++    (void)fprintf(stderr,"%s",msg_fq);
+     ret = -1;
+     break;
+   case BADCONT :
+-    (void)fprintf(stderr,msg_cnt);
++    (void)fprintf(stderr,"%s",msg_cnt);
+     ret = -1;
+     break;
+   case NOENT  :   /* 91.12.03 */
+@@ -526,7 +526,7 @@
+       (void)fprintf(stderr, msg_abnls, init);
+     }
+     else {
+-      (void)fprintf(stderr, msg_abnl);
++      (void)fprintf(stderr, "%s", msg_abnl);
+     }
+     exit(ERR_VALUE);
+     break;
+@@ -556,7 +556,7 @@
+       (void)fprintf(stderr, msg_abnls,init);
+     }
+     else {
+-      (void)fprintf(stderr, msg_abnl);
++      (void)fprintf(stderr, "%s", msg_abnl);
+     }
+     ret = -1;
+     return ret;
+@@ -567,13 +567,13 @@
+       (void)fprintf(stderr, msg_mnts, init);
+       }
+       else {
+-        (void)fprintf(stderr, msg_mnt);
++        (void)fprintf(stderr, "%s", msg_mnt);
+       }
+       ret = -1;
+       return ret;
+     }
+     if ((mode & PL_DIC) == PL_DIC ) {
+-      (void)fprintf(stderr, msg_fq);
++      (void)fprintf(stderr, "%s", msg_fq);
+       ret = -1 ;
+       return ret ;
+     }
+@@ -608,7 +608,7 @@
+     ret = -2;   /* 93.03.03 */
+     break;
+   case BADCONT :
+-    (void)fprintf(stderr, msg_cnt);
++    (void)fprintf(stderr, "%s", msg_cnt);
+     ret = -1;
+     break;
+   default:
+@@ -616,7 +616,7 @@
+       (void)fprintf(stderr, msg_abnls, init);
+     }
+     else {
+-      (void)fprintf(stderr, msg_abnl);
++      (void)fprintf(stderr, "%s", msg_abnl);
+     }
+     ret = -1;
+     break;
+@@ -651,7 +651,7 @@
+     ret = -2;   /* 93.03.03 */
+     break;
+   case BADCONT :
+-    (void)fprintf(stderr, msg_cnt);
++    (void)fprintf(stderr, "%s", msg_cnt);
+     ret = -1;
+     break;
+   default:
+@@ -659,7 +659,7 @@
+       (void)fprintf(stderr, msg_abnls, init);
+     }
+     else {
+-      (void)fprintf(stderr, msg_abnl);
++      (void)fprintf(stderr, "%s", msg_abnl);
+     }
+     ret = -1;
+     break;

Reply via email to