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: <20221208011122.2343363-3-jesse.brandeburg@intel.com>
Date:   Wed,  7 Dec 2022 17:11:11 -0800
From:   Jesse Brandeburg <jesse.brandeburg@...el.com>
To:     mkubecek@...e.cz
Cc:     netdev@...r.kernel.org,
        Jesse Brandeburg <jesse.brandeburg@...el.com>
Subject: [PATCH ethtool v2 02/13] ethtool: fix trivial issue in allocation

Fix the following warning by changing the type being multiplied by to
the type being assigned to.

Description: Result of 'calloc' is converted to a pointer of type
'unsigned long', which is incompatible with sizeof operand type 'long'
File: /home/jbrandeb/git/ethtool/rxclass.c
Line: 527

Fixes: 5a3279e43f2b ("rxclass: Replace global rmgr with automatic variable/parameter")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
---
 rxclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rxclass.c b/rxclass.c
index 6cf81fdafc85..ebdd97960e5b 100644
--- a/rxclass.c
+++ b/rxclass.c
@@ -524,7 +524,7 @@ static int rmgr_init(struct cmd_context *ctx, struct rmgr_ctrl *rmgr)
 	}
 
 	/* initialize bitmap for storage of valid locations */
-	rmgr->slot = calloc(1, BITS_TO_LONGS(rmgr->size) * sizeof(long));
+	rmgr->slot = calloc(1, BITS_TO_LONGS(rmgr->size) * sizeof(unsigned long));
 	if (!rmgr->slot) {
 		perror("rmgr: Cannot allocate memory for RX class rules");
 		return -1;
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ