All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] net: Fix Covarity Defect 244093
@ 2019-07-30 21:57 Joe Hershberger
  2019-07-30 21:57 ` [U-Boot] [PATCH 2/2] net: mdio: Clarify code flow Covarity 244085 & 244090 Joe Hershberger
  2019-09-04 16:39 ` [U-Boot] net: Fix Covarity Defect 244093 Joe Hershberger
  0 siblings, 2 replies; 4+ messages in thread
From: Joe Hershberger @ 2019-07-30 21:57 UTC (permalink / raw)
  To: u-boot

Don't allow unterminated strings

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
---

 net/mdio-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c
index 36a404ff44..1c0d25272a 100644
--- a/net/mdio-uclass.c
+++ b/net/mdio-uclass.c
@@ -75,7 +75,7 @@ static int dm_mdio_post_probe(struct udevice *dev)
 	pdata->mii_bus->write = mdio_write;
 	pdata->mii_bus->reset = mdio_reset;
 	pdata->mii_bus->priv = dev;
-	strncpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN);
+	strncpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN - 1);
 
 	return mdio_register(pdata->mii_bus);
 }
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] net: mdio: Clarify code flow Covarity 244085 & 244090
  2019-07-30 21:57 [U-Boot] [PATCH 1/2] net: Fix Covarity Defect 244093 Joe Hershberger
@ 2019-07-30 21:57 ` Joe Hershberger
  2019-09-04 16:39   ` [U-Boot] " Joe Hershberger
  2019-09-04 16:39 ` [U-Boot] net: Fix Covarity Defect 244093 Joe Hershberger
  1 sibling, 1 reply; 4+ messages in thread
From: Joe Hershberger @ 2019-07-30 21:57 UTC (permalink / raw)
  To: u-boot

Document that the lack of breaks is intentional.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
---

 cmd/mdio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmd/mdio.c b/cmd/mdio.c
index add6440813..22c8fbe856 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -253,12 +253,13 @@ static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	case 'w':
 		if (pos > 1)
 			data = simple_strtoul(argv[pos--], NULL, 16);
+		/* Intentional fall-through - Get reg for read and write */
 	case 'r':
 		if (pos > 1)
 			if (extract_reg_range(argv[pos--], &devadlo, &devadhi,
 					      &reglo, &reghi))
 				return CMD_RET_FAILURE;
-
+		/* Intentional fall-through - Get phy for all commands */
 	default:
 		if (pos > 1)
 			if (extract_phy_range(&argv[2], pos - 1, &bus,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] net: Fix Covarity Defect 244093
  2019-07-30 21:57 [U-Boot] [PATCH 1/2] net: Fix Covarity Defect 244093 Joe Hershberger
  2019-07-30 21:57 ` [U-Boot] [PATCH 2/2] net: mdio: Clarify code flow Covarity 244085 & 244090 Joe Hershberger
@ 2019-09-04 16:39 ` Joe Hershberger
  1 sibling, 0 replies; 4+ messages in thread
From: Joe Hershberger @ 2019-09-04 16:39 UTC (permalink / raw)
  To: u-boot

Hi Joe,

https://patchwork.ozlabs.org/patch/1139394/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git

Thanks!
-Joe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] net: mdio: Clarify code flow Covarity 244085 & 244090
  2019-07-30 21:57 ` [U-Boot] [PATCH 2/2] net: mdio: Clarify code flow Covarity 244085 & 244090 Joe Hershberger
@ 2019-09-04 16:39   ` Joe Hershberger
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Hershberger @ 2019-09-04 16:39 UTC (permalink / raw)
  To: u-boot

Hi Joe,

https://patchwork.ozlabs.org/patch/1139393/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git

Thanks!
-Joe

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-04 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30 21:57 [U-Boot] [PATCH 1/2] net: Fix Covarity Defect 244093 Joe Hershberger
2019-07-30 21:57 ` [U-Boot] [PATCH 2/2] net: mdio: Clarify code flow Covarity 244085 & 244090 Joe Hershberger
2019-09-04 16:39   ` [U-Boot] " Joe Hershberger
2019-09-04 16:39 ` [U-Boot] net: Fix Covarity Defect 244093 Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.