lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250719163122.51904-1-ant.v.moryakov@gmail.com>
Date: Sat, 19 Jul 2025 19:31:22 +0300
From: Anton Moryakov <ant.v.moryakov@...il.com>
To: netdev@...r.kernel.org
Cc: Anton Moryakov <ant.v.moryakov@...il.com>
Subject: [PATCH iproute2-next] misc: ss.c: fix logical error in main function

In the line if (!dump_tcpdiag) { there was a logical error 
in checking the descriptor, which the static analyzer complained 
about (this action is always false)

fixed by replacing !dump_tcpdiag with !dump_fp

Reported-by: SVACE static analyzer
Signed-off-by: Anton Moryakov <ant.v.moryakov@...il.com>
---
 misc/ss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/ss.c b/misc/ss.c
index de02fccb..20d0766d 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -6228,7 +6228,7 @@ int main(int argc, char *argv[])
 		}
 		if (dump_tcpdiag[0] != '-') {
 			dump_fp = fopen(dump_tcpdiag, "w");
-			if (!dump_tcpdiag) {
+			if (!dump_fp) {
 				perror("fopen dump file");
 				exit(-1);
 			}
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ