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-prev] [day] [month] [year] [list]
Date:   Wed, 15 Nov 2017 15:01:30 +0100
From:   Phil Sutter <phil@....cc>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     netdev@...r.kernel.org
Subject: [iproute PATCH 1/2] tc_util: Drop needless pointer check

The function parse_action_control_slash() returns early if 'p' is NULL,
so after the first call to action_a2n(), 'p' is guaranteed not to be
NULL. Otherwise, the assignment '*p = 0' above would dereference the
NULL pointer already anyway, so just drop this check here.

Signed-off-by: Phil Sutter <phil@....cc>
---
 tc/tc_util.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tc/tc_util.c b/tc/tc_util.c
index b39e5508235ed..b01362533cd56 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -631,8 +631,7 @@ int parse_action_control_slash(int *argc_p, char ***argv_p,
 							 allow_num);
 	*p = 0;
 	if (action_a2n(*argv, &result1, allow_num)) {
-		if (p)
-			*p = '/';
+		*p = '/';
 		return -1;
 	}
 
-- 
2.13.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ