[openib-general] [PATCH] ibsrpdm - allocate agent

Ishai Rabinovitz ishai at mellanox.co.il
Sun May 28 07:27:12 PDT 2006


The array agent is allocated with no entries.
When agent is being accessed in create_agent there is a memory corruption.

Signed-off-by: Ishai Rabinovitz <ishai at mellanox.co.il>

Index: last_stable/src/userspace/srptools/src/srp-dm.c
===================================================================
--- last_stable.orig/src/userspace/srptools/src/srp-dm.c	2006-05-28 14:24:25.000000000 +0300
+++ last_stable/src/userspace/srptools/src/srp-dm.c	2006-05-28 14:55:41.000000000 +0300
@@ -536,7 +536,7 @@ static int get_port_list(int fd, uint32_
 int main(int argc, char *argv[])
 {
 	int		fd;
-	uint32_t	agent[0];
+	uint32_t	agent[2];
 	char	       *cmd_name = strdup(argv[0]);
 
 	while (1) {
-- 
Ishai Rabinovitz



More information about the general mailing list