diff options
Diffstat (limited to 'net-misc/sipp')
-rw-r--r-- | net-misc/sipp/Manifest | 2 | ||||
-rw-r--r-- | net-misc/sipp/files/sipp-3.7.3-overflow.patch | 84 | ||||
-rw-r--r-- | net-misc/sipp/sipp-3.7.3-r1.ebuild | 49 |
3 files changed, 135 insertions, 0 deletions
diff --git a/net-misc/sipp/Manifest b/net-misc/sipp/Manifest index b92568a39065..476946632fff 100644 --- a/net-misc/sipp/Manifest +++ b/net-misc/sipp/Manifest @@ -1,5 +1,7 @@ +AUX sipp-3.7.3-overflow.patch 4146 BLAKE2B cfd241cf54a39c1fd9e30e155d0fc6c2361aa4eac5e77b60484fadbd2ea7a26bd1957ff5b56691bc29f91a6bbf1495701305ba7446a25633d2180db120f80d78 SHA512 c2cc3a7a1112479a02af5e8cbe2f09cd107616198c7324a28880366ef36eb1e24bc6bb16116affa33ce764630d691805a2083345fd7e486d09b9877b037637a7 DIST sipp-3.7.1.tar.gz 927012 BLAKE2B d79cde44761a22ca5dcc737dead9163056e0dc2504c225d23d834b4ae2bc204b1b87f87753ac662ec59e1a940cf1b4f0c47ff0b427b30b373a3c0ad91a5ad4ae SHA512 4c4c588bb3feebfbc6bad32c1565bb76de7eb433b9b40aa948dfbb63022a9cbadaf6d38cb0826c06593e10cc6a4d328a9bb9c94f885d8f8763432612963db94b DIST sipp-3.7.3.tar.gz 932370 BLAKE2B 8a7cbafe89e6bfbeba16f65f173d18d4239848fd33ecf9670ff36800020e88dbf7a4d49ff35a87cb5b87c1c15d8b85ccdfc6c916982e4a892172d349ec551d88 SHA512 a04f8d02bd19068d5a6895e1c800f21ee7dc4355f9d7800579a7961c9388ad74144994a63a8fdfdc5b0fca09f7fd6ab004e14e5067e0ff9a79037194661abada EBUILD sipp-3.7.1.ebuild 943 BLAKE2B 5c947d5a574e65fcb31f9d45a0aabec240ac80a4349f2f08845b348122c08a529af38680b043f36129e29daf23aa5ecb042a8ba49ef791ed4a724ecbdce73afd SHA512 61124eee58cb98a69012d5f8e8a50ddc9048f05364a64e1b46d0da9832ab76764f38276bc62c51c8186179a2099a59f810ce8684258c738d9218d3564ce8e146 +EBUILD sipp-3.7.3-r1.ebuild 953 BLAKE2B 7bb3f65f57d3d7c990f4aef08415a66147adb86a7d7c9164f7315e058c4b6e98c397af2b2fb438a4919397c38e86b8dd3046b7a138592c234f0d159803bb1ead SHA512 c027d86e61d420631657c12383a54ead313dc58ec6cc3e919a301690bc2fbf4e910fdf2900e665eeaed492b7b19c9e1dedfd24b9f12acd33b1f0a2d68fac573d EBUILD sipp-3.7.3.ebuild 905 BLAKE2B 22390889100884a21efd88b3fab4d2bde9c73ca44bdfe39006387d36a9c6ef25f2e9146c75f217241cb91d1afcb28f22cb2aa8493d690c39c7a667897da56014 SHA512 5c1c302cacc31e4f49d3ee44cbcf2ad64be4685f46707e908995fafbbe179dd0415e0b1c61592d1776d84f62e8a1081f2f30a4f291c89319d6bd24654cf04ce0 MISC metadata.xml 561 BLAKE2B e3c503563c5770583e88d07de401c4ef38280f1892982f67439248ea735e07842d678100f93e959a18ca1865dfb9756e38baafde9ef421ce2ccb20ff67600443 SHA512 83e9402bbc6baba331a9f348d7c7fb6794345b41453cbd21f6e47cfc93f1044b5fdd55d96c2646434ba6206ba1424f29d96f35cf67b8c81284760e04fad7480f diff --git a/net-misc/sipp/files/sipp-3.7.3-overflow.patch b/net-misc/sipp/files/sipp-3.7.3-overflow.patch new file mode 100644 index 000000000000..87e9c468e576 --- /dev/null +++ b/net-misc/sipp/files/sipp-3.7.3-overflow.patch @@ -0,0 +1,84 @@ +https://bugs.gentoo.org/940748 +https://github.com/SIPp/sipp/commit/fdc0c97e1d8acbe4de0d89cf26dfe74bf9b413ed + +From fdc0c97e1d8acbe4de0d89cf26dfe74bf9b413ed Mon Sep 17 00:00:00 2001 +From: Orgad Shaneh <orgad.shaneh@audiocodes.com> +Date: Wed, 11 Sep 2024 20:55:06 +0300 +Subject: [PATCH] Fix 32-bit compilation + +--- a/src/call.cpp ++++ b/src/call.cpp +@@ -1563,8 +1563,8 @@ char * call::get_last_header(const char * name) + if (name[len - 1] == ':') { + return get_header(last_recv_msg, name, false); + } else { +- char with_colon[MAX_HEADER_LEN]; +- sprintf(with_colon, "%s:", name); ++ char with_colon[MAX_HEADER_LEN+2]; ++ snprintf(with_colon, MAX_HEADER_LEN+2, "%s:", name); + return get_header(last_recv_msg, with_colon, false); + } + } +@@ -1604,8 +1604,8 @@ char * call::get_last_request_uri() + } + + last_request_uri[0] = '\0'; +- if (tmp && (tmp_len > 0)) { +- strncpy(last_request_uri, tmp, tmp_len); ++ if (tmp_len > 0) { ++ memcpy(last_request_uri, tmp, tmp_len); + } + last_request_uri[tmp_len] = '\0'; + +--- a/src/rtpstream.cpp ++++ b/src/rtpstream.cpp +@@ -2702,7 +2702,7 @@ void rtpstream_audioecho_thread(void* param) + pthread_mutex_lock(&debugremutexaudio); + if (debugrefileaudio != nullptr) + { +- fprintf(debugrefileaudio, "DATA SUCCESSFULLY RECEIVED [AUDIO] nr = %ld...", nr); ++ fprintf(debugrefileaudio, "DATA SUCCESSFULLY RECEIVED [AUDIO] nr = %d...", int(nr)); + } + for (int i = 0; i < 12; i++) + { +@@ -2780,7 +2780,8 @@ void rtpstream_audioecho_thread(void* param) + pthread_mutex_lock(&debugremutexaudio); + if (debugrefileaudio != nullptr) + { +- fprintf(debugrefileaudio, "DATA SUCCESSFULLY SENT [AUDIO] seq_num = [%u] -- MISMATCHED RECV/SENT BYTE COUNT -- errno = %d nr = %ld ns = %ld\n", seq_num, errno, nr, ns); ++ fprintf(debugrefileaudio, "DATA SUCCESSFULLY SENT [AUDIO] seq_num = [%u] -- MISMATCHED RECV/SENT BYTE COUNT -- errno = %d nr = %d ns = %d\n", ++ seq_num, errno, int(nr), int(ns)); + } + pthread_mutex_unlock(&debugremutexaudio); + } else { +@@ -2961,7 +2962,7 @@ void rtpstream_videoecho_thread(void* param) + pthread_mutex_lock(&debugremutexvideo); + if (debugrefilevideo != nullptr) + { +- fprintf(debugrefilevideo, "DATA SUCCESSFULLY RECEIVED [VIDEO] nr = %ld...", nr); ++ fprintf(debugrefilevideo, "DATA SUCCESSFULLY RECEIVED [VIDEO] nr = %d...", int(nr)); + } + for (int i = 0; i < 12; i++) + { +@@ -3038,7 +3039,8 @@ void rtpstream_videoecho_thread(void* param) + pthread_mutex_lock(&debugremutexvideo); + if (debugrefilevideo != nullptr) + { +- fprintf(debugrefilevideo, "DATA SUCCESSFULLY SENT [VIDEO] seq_num = [%u] -- MISMATCHED RECV/SENT BYTE COUNT -- errno = %d nr = %ld ns = %ld\n", seq_num, errno, nr, ns); ++ fprintf(debugrefilevideo, "DATA SUCCESSFULLY SENT [VIDEO] seq_num = [%u] -- MISMATCHED RECV/SENT BYTE COUNT -- errno = %d nr = %d ns = %d\n", ++ seq_num, errno, int(nr), int(ns)); + } + pthread_mutex_unlock(&debugremutexvideo); + } else { +--- a/src/sip_parser.cpp ++++ b/src/sip_parser.cpp +@@ -455,7 +455,7 @@ static const char* internal_find_header(const char* msg, const char* name, const + ptr = strchr(ptr, '\n'); + if (!ptr || ptr[-1] != '\r' || (ptr[1] == '\r' && ptr[2] == '\n')) { + if (ptr && ptr[-1] != '\r') { +- WARNING("Missing CR during header scan at pos %ld", ptr - msg); ++ WARNING("Missing CR during header scan at pos %d", int(ptr - msg)); + /* continue? */ + } + return nullptr; + diff --git a/net-misc/sipp/sipp-3.7.3-r1.ebuild b/net-misc/sipp/sipp-3.7.3-r1.ebuild new file mode 100644 index 000000000000..fdfaa3ac31dd --- /dev/null +++ b/net-misc/sipp/sipp-3.7.3-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="A free Open Source test tool / traffic generator for the SIP protocol" +HOMEPAGE="https://github.com/SIPp/sipp" +SRC_URI="https://github.com/SIPp/sipp/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-2 ISC" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gsl +pcap sctp +ssl" + +DEPEND="sys-libs/ncurses:= + gsl? ( sci-libs/gsl:= ) + pcap? ( + net-libs/libpcap + net-libs/libnet:1.1 + ) + sctp? ( net-misc/lksctp-tools ) + ssl? ( dev-libs/openssl:= ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-overflow.patch +) + +src_configure() { + local mycmakeargs=( + -DUSE_GSL=$(usex gsl 1 0) + -DUSE_PCAP=$(usex pcap 1 0) + -DUSE_SCTP=$(usex sctp 1 0) + -DUSE_SSL=$(usex ssl 1 0) + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + insinto /usr/share/${PN} + use pcap && doins pcap/*.pcap + dodoc CHANGES.md README.md +} |