commit:     5a8034fff6a4ef923daf2076fa0112108774c9a7
Author:     NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 20 22:54:30 2017 +0000
Commit:     NP Hardass <np-hardass <AT> gentoo <DOT> org>
CommitDate: Wed Sep 20 23:36:09 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a8034ff

net-misc/vde: Fix compilation with format-security

Closes: https://bugs.gentoo.org/520306
Bug: https://bugs.gentoo.org/520306
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 net-misc/vde/files/vde-2.3.2-format-security.patch | 18 ++++++++++++++++++
 net-misc/vde/vde-2.3.2-r4.ebuild                   |  2 ++
 2 files changed, 20 insertions(+)

diff --git a/net-misc/vde/files/vde-2.3.2-format-security.patch 
b/net-misc/vde/files/vde-2.3.2-format-security.patch
new file mode 100644
index 00000000000..d1cfaa58cb2
--- /dev/null
+++ b/net-misc/vde/files/vde-2.3.2-format-security.patch
@@ -0,0 +1,18 @@
+--- a/src/common/cmdparse.c    2017-09-20 18:47:31.662856695 -0400
++++ b/src/common/cmdparse.c    2017-09-20 18:48:54.008852141 -0400
+@@ -284,13 +284,13 @@
+                                                               int i;
+                                                               for 
(i=0;i<argc;i++) {
+                                                                       if (i) 
fprintf(mf," ");
+-                                                                      
fprintf(mf,argv[i]);
++                                                                      
fprintf(mf,"%s",argv[i]);
+                                                               }
+                                                       } else {
+                                                               int num=atoi(t);
+                                                               while (*t >='0' 
&& *t <= '9') t++;
+                                                               if (num < argc) 
+-                                                                      
fprintf(mf,argv[num]);
++                                                                      
fprintf(mf,"%s",argv[num]);
+                                                       }
+                                               } else
+                                                       fprintf(mf,"%c",*t);

diff --git a/net-misc/vde/vde-2.3.2-r4.ebuild b/net-misc/vde/vde-2.3.2-r4.ebuild
index f0872a509c6..fe1cc671c9a 100644
--- a/net-misc/vde/vde-2.3.2-r4.ebuild
+++ b/net-misc/vde/vde-2.3.2-r4.ebuild
@@ -31,6 +31,8 @@ RDEPEND="${COMMON_DEPS}
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=( "${FILESDIR}/${P}-format-security.patch" )
+
 pkg_setup() {
        # default group already used in kqemu
        enewgroup qemu

Reply via email to