From d81ef06b7152bf7b90b5c02a8263de4fe3621c66 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Tue, 11 Jun 2013 13:38:18 +0200 Subject: [PATCH] - more automake hackery - fix format string errors - rel 11 --- am.patch | 8 ++++++++ dchub.spec | 4 +++- format-security.patch | 44 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 format-security.patch diff --git a/am.patch b/am.patch index 8287d84..13362ec 100644 --- a/am.patch +++ b/am.patch @@ -9,3 +9,11 @@ AM_SANITY_CHECK AC_ISC_POSIX +@@ -13,7 +13,6 @@ + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_LN_S +-AM_PROG_CC_STDC + + dnl dnl check for msgfmt + AC_CHECK_PROG(HAVE_MSGFMT,msgfmt,yes,no) diff --git a/dchub.spec b/dchub.spec index f77b4e9..5141bda 100644 --- a/dchub.spec +++ b/dchub.spec @@ -2,7 +2,7 @@ Summary: Direct Connect Hub Summary(pl.UTF-8): Serwer Direct Connect Name: dchub Version: 0.5.2 -Release: 10 +Release: 11 License: GPL Group: Applications/Communications Source0: http://ac2i.homelinux.com/dctc/%{name}-%{version}.tar.gz @@ -12,6 +12,7 @@ Patch1: %{name}-init.patch Patch2: %{name}-crcdir.patch Patch3: %{name}-pic.patch Patch4: am.patch +Patch5: format-security.patch URL: http://ac2i.homelinux.com/dctc/ BuildRequires: autoconf BuildRequires: automake @@ -44,6 +45,7 @@ dchub jest hubem sieci direct connect służącej do wymiany plików. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build %{__aclocal} diff --git a/format-security.patch b/format-security.patch new file mode 100644 index 0000000..7ac8106 --- /dev/null +++ b/format-security.patch @@ -0,0 +1,44 @@ +--- dchub-0.5.2/extprog/ulist.c~ 2003-05-06 18:57:16.000000000 +0200 ++++ dchub-0.5.2/extprog/ulist.c 2013-06-11 13:37:26.846548963 +0200 +@@ -363,22 +363,22 @@ + xi->type=0; + xi->addr=g_string_new(""); + if(addr!=NULL) +- g_string_sprintf(xi->addr,addr); ++ g_string_sprintf(xi->addr,"%s",addr); + xi->client=g_string_new(""); + if(client!=NULL) +- g_string_sprintf(xi->client,client); ++ g_string_sprintf(xi->client,"%s",client); + xi->version=version; + xi->versionadd=g_string_new(""); + if(versionadd!=NULL) +- g_string_sprintf(xi->versionadd,versionadd); ++ g_string_sprintf(xi->versionadd,"%s",versionadd); + xi->locka=g_string_new(""); + if(lock!=NULL) +- g_string_sprintf(xi->locka,lock); ++ g_string_sprintf(xi->locka,"%s",lock); + xi->lockb=g_string_new(""); + xi->lockc=g_string_new(""); + xi->pka=g_string_new(""); + if(pk!=NULL) +- g_string_sprintf(xi->pka,pk); ++ g_string_sprintf(xi->pka,"%s",pk); + xi->pkb=g_string_new(""); + xi->pkc=g_string_new(""); + xi->has_bzlist=has_bzlist; +@@ -397,11 +397,11 @@ + xi->need_scan=3; + xi->d_client=g_string_new(""); + if(d_client!=NULL) +- g_string_sprintf(xi->d_client,d_client); ++ g_string_sprintf(xi->d_client,"%s",d_client); + xi->d_version=d_version; + xi->d_versionadd=g_string_new(""); + if(d_versionadd!=NULL) +- g_string_sprintf(xi->d_versionadd,d_versionadd); ++ g_string_sprintf(xi->d_versionadd,"%s",d_versionadd); + xi->lock_time=lock_time; + xi->last_call=time(NULL); + xi->warnmsg_send=FALSE; -- 2.43.0