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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191106093239.25517-6-rrichter@marvell.com>
Date:   Wed, 6 Nov 2019 09:33:11 +0000
From:   Robert Richter <rrichter@...vell.com>
To:     Borislav Petkov <bp@...en8.de>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Tony Luck <tony.luck@...el.com>
CC:     James Morse <james.morse@....com>,
        Robert Richter <rrichter@...vell.com>,
        "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Joe Perches <joe@...ches.com>
Subject: [PATCH v2 05/20] EDAC, mc: Remove needless zero string termination

Since this is a string already and strlen() has been used to advance
the pointer, the end of the buffer is already zero terminated. Remove
the needless zero string termination.

Suggested-by: Joe Perches <joe@...ches.com>
Signed-off-by: Robert Richter <rrichter@...vell.com>
---
 drivers/edac/edac_mc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index f2cbca77bc50..8bfe76d1bdf1 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -1183,7 +1183,6 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,
 			}
 			strcpy(p, dimm->label);
 			p += strlen(p);
-			*p = '\0';
 
 			/*
 			 * get csrow/channel of the DIMM, in order to allow
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ