diff options
-rw-r--r-- | net-voip/sipp/ChangeLog | 8 | ||||
-rw-r--r-- | net-voip/sipp/Manifest | 4 | ||||
-rw-r--r-- | net-voip/sipp/files/sipp-3.1-fix-auth.c-sprintf.patch | 58 | ||||
-rw-r--r-- | net-voip/sipp/sipp-3.1.ebuild | 2 |
4 files changed, 70 insertions, 2 deletions
diff --git a/net-voip/sipp/ChangeLog b/net-voip/sipp/ChangeLog new file mode 100644 index 0000000..cef91d5 --- /dev/null +++ b/net-voip/sipp/ChangeLog @@ -0,0 +1,8 @@ +# ChangeLog for net-voip/sipp +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 07 Aug 2010; Thilo Bangert <bangert@gentoo.org> sipp-3.1.ebuild, + +files/sipp-3.1-fix-auth.c-sprintf.patch: + fix illegal (?) usage of sprintf + diff --git a/net-voip/sipp/Manifest b/net-voip/sipp/Manifest index eff3f1a..0650bcf 100644 --- a/net-voip/sipp/Manifest +++ b/net-voip/sipp/Manifest @@ -1,4 +1,6 @@ +AUX sipp-3.1-fix-auth.c-sprintf.patch 2129 RMD160 f32cab0c0e8c5ff6216177f7177056c0f69a31d4 SHA1 d43faa23efc5455d1fa66ca9d22955e5defef8ed SHA256 acadc6e25ee020146d9a9c4e848cd702e606e6d860ad3f20eb379b014047ebdc AUX sipp-3.1-gcc43.patch 490 RMD160 f57f7524ccdd90a5367bf5cca13665a1d4072379 SHA1 c63915eec4a0c0789585f84c35c2053ceb3c6696 SHA256 13aea89d251cfecec37a31b3fe773029059689a588e56a422656232e5ff84f1f DIST sipp.3.1.src.tar.gz 9428792 RMD160 bd89c94b3a006fdc5717d43765776901976dbf71 SHA1 781e50a74844abbdff1b90781fa24d062f0c1352 SHA256 123391c7c5545fc61594cd62334986540604f5a3a3d405faef5e02dab5200399 -EBUILD sipp-3.1.ebuild 1531 RMD160 7ded3ac0981436c7ef7a0f36544abf1c063e4533 SHA1 c5c2d69c26f0356594600205e127e74362432a89 SHA256 5d8e8a5b065657c769b7aa6dbc97b2a519548843fd5330991148cb9a13feacc7 +EBUILD sipp-3.1.ebuild 1586 RMD160 c82607d60d28066bed5ee6c0a296c26b2d288053 SHA1 94b73f083bf455ffcf6ee765d88edc90a276223d SHA256 05c3a4ce61bdb88ffbe83147653f3f0e08871f1bfdf451d2ff1798de5303c143 +MISC ChangeLog 261 RMD160 ea2b7ae4a3016c8904b6a62b462e76a84afb3cf8 SHA1 50ec2306a27f8a267a205e6a42ad1bb0965e1fe5 SHA256 7d8ded8bbf4f64458a37fd8fb1a72ab1db4f407285d561d9ea4a7b4c40bd75d9 MISC metadata.xml 944 RMD160 66f629c15c3a41b440e6d484ec76698e80e8ae3b SHA1 f300b8ac471443987016123a16dfff410785fca6 SHA256 fdd22b71c035c698e32c230d47caf5e3d058c22a705f990933bb61d0218ff26a diff --git a/net-voip/sipp/files/sipp-3.1-fix-auth.c-sprintf.patch b/net-voip/sipp/files/sipp-3.1-fix-auth.c-sprintf.patch new file mode 100644 index 0000000..d295f30 --- /dev/null +++ b/net-voip/sipp/files/sipp-3.1-fix-auth.c-sprintf.patch @@ -0,0 +1,58 @@ +Index: auth.c +=================================================================== +--- auth.c (revision 590) ++++ auth.c (working copy) +@@ -214,7 +214,7 @@ + int createAuthHeaderMD5(char * user, char * password, int password_len, char * method, + char * uri, char * msgbody, char * auth, + char * algo, char * result) { +- ++ int res_len = 0; + unsigned char ha1[MD5_HASH_SIZE], ha2[MD5_HASH_SIZE]; + unsigned char resp[MD5_HASH_SIZE], body[MD5_HASH_SIZE]; + unsigned char ha1_hex[HASH_HEX_SIZE+1], ha2_hex[HASH_HEX_SIZE+1]; +@@ -252,9 +252,9 @@ + MD5_Final(ha1, &Md5Ctx); + hashToHex(&ha1[0], &ha1_hex[0]); + +- sprintf(result, "Digest username=\"%s\",realm=\"%s\"",user,tmp); ++ res_len += sprintf(result + res_len, "Digest username=\"%s\",realm=\"%s\"",user,tmp); + if (cnonce[0] != '\0') { +- sprintf(result, "%s,cnonce=\"%s\",nc=%s,qop=%s",result,cnonce,nc,authtype); ++ res_len += sprintf(result + res_len , ",cnonce=\"%s\",nc=%s,qop=%s",cnonce,nc,authtype); + } + + // Construct the URI +@@ -284,7 +284,7 @@ + MD5_Final(ha2, &Md5Ctx); + hashToHex(&ha2[0], &ha2_hex[0]); + +- sprintf(result, "%s,uri=\"%s\"",result,tmp); ++ res_len += sprintf(result + res_len, ",uri=\"%s\"",tmp); + + // Extract the Nonce + if (!getAuthParameter("nonce", auth, tmp, sizeof(tmp))) { +@@ -309,10 +309,10 @@ + MD5_Final(resp, &Md5Ctx); + hashToHex(&resp[0], &resp_hex[0]); + +- sprintf(result, "%s,nonce=\"%s\",response=\"%s\",algorithm=%s",result,tmp,resp_hex,algo); ++ res_len += sprintf(result + res_len, ",nonce=\"%s\",response=\"%s\",algorithm=%s",tmp,resp_hex,algo); + + if (has_opaque) { +- sprintf(result, "%s,opaque=\"%s\"",result,opaque); ++ res_len += sprintf(result + res_len, ",opaque=\"%s\"",opaque); + } + + return 1; +@@ -677,7 +677,9 @@ + } + auts_hex[AUTS64LEN-1]=0; + +- sprintf(result, "%s,auts=\"%s\"",result,auts_hex); ++ int res_len = strlen(result); ++ ++ sprintf(result + res_len, ",auts=\"%s\"",auts_hex); + } + free(nonce); + return 1; diff --git a/net-voip/sipp/sipp-3.1.ebuild b/net-voip/sipp/sipp-3.1.ebuild index 1831702..ee7a461 100644 --- a/net-voip/sipp/sipp-3.1.ebuild +++ b/net-voip/sipp/sipp-3.1.ebuild @@ -25,7 +25,7 @@ DEPEND="sys-libs/ncurses S="${WORKDIR}/${PN}.svn" src_prepare() { - + epatch "${FILESDIR}/sipp-3.1-fix-auth.c-sprintf.patch" epatch "${FILESDIR}"/${P}-gcc43.patch } |