summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2019-12-26 14:09:45 +0100
committerJeroen Roovers <jer@gentoo.org>2019-12-26 14:09:58 +0100
commit4db35b3a2131c1973835b865106d3034d2e0635a (patch)
tree5db58835b7441cfd7d0adfa5ad08985eadbc723b /net-analyzer/nmap/files
parentnet-vpn/wireguard-tools: adjust checksum (diff)
downloadgentoo-4db35b3a2131c1973835b865106d3034d2e0635a.tar.gz
gentoo-4db35b3a2131c1973835b865106d3034d2e0635a.tar.bz2
gentoo-4db35b3a2131c1973835b865106d3034d2e0635a.zip
net-analyzer/nmap: Patch live ebuild
Package-Manager: Portage-2.3.83, Repoman-2.3.20 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-analyzer/nmap/files')
-rw-r--r--net-analyzer/nmap/files/nmap-9999-constify-continued.patch22
-rw-r--r--net-analyzer/nmap/files/nmap-9999-netutil-else.patch20
2 files changed, 42 insertions, 0 deletions
diff --git a/net-analyzer/nmap/files/nmap-9999-constify-continued.patch b/net-analyzer/nmap/files/nmap-9999-constify-continued.patch
new file mode 100644
index 000000000000..04738f408231
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-9999-constify-continued.patch
@@ -0,0 +1,22 @@
+--- a/libnetutil/EthernetHeader.cc
++++ b/libnetutil/EthernetHeader.cc
+@@ -284,7 +284,7 @@ int EthernetHeader::setEtherType(u16 val){
+
+
+ /** Returns destination port in HOST byte order */
+-u16 EthernetHeader::getEtherType() const {
++const u16 EthernetHeader::getEtherType() const {
+ return ntohs(this->h.eth_type);
+ } /* End of getEtherType() */
+
+--- a/scan_engine.cc
++++ b/scan_engine.cc
+@@ -166,7 +166,7 @@ extern "C" int g_has_npcap_loopback;
+ #endif
+
+
+-int HssPredicate::operator() (const HostScanStats *lhs, const HostScanStats *rhs) const {
++const int HssPredicate::operator() (const HostScanStats *lhs, const HostScanStats *rhs) const {
+ const struct sockaddr_storage *lss, *rss;
+ lss = (lhs) ? lhs->target->TargetSockAddr() : ss;
+ rss = (rhs) ? rhs->target->TargetSockAddr() : ss;
diff --git a/net-analyzer/nmap/files/nmap-9999-netutil-else.patch b/net-analyzer/nmap/files/nmap-9999-netutil-else.patch
new file mode 100644
index 000000000000..a96a04b7a87f
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-9999-netutil-else.patch
@@ -0,0 +1,20 @@
+--- a/libnetutil/netutil.cc
++++ b/libnetutil/netutil.cc
+@@ -2571,7 +2571,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
+
+ /* CASE 4: where we (finally!) have a full 20 byte TCP header so we can
+ * safely print all fields */
+- else { /* if (datalen >= 20) */
++ else if (datalen >= 20) {
+
+ /* TCP Flags */
+ p = tflags;
+@@ -2633,7 +2633,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
+ (tcpoptinfo[0]!='\0') ? " " : "",
+ tcpoptinfo, ipinfo);
+ }
+- } else{
++ } else {
+ /* If the packet does not fall into any other category, then we have a
+ really screwed-up packet. */
+ /* This ought to be unreachable; if static analysis flags it as such, delete it. */