Hi Hal
I just run into a memory violation reported by glibc.
I was able to trace it into the options cache parser.
Allocation missed the null char ...
Eitan
Signed-off-by: Eitan Zahavi <[EMAIL PROTECTED]>
Index: opensm/osm_subnet.c
===================================================================
--- opensm/osm_subnet.c (revision 5628)
+++ opensm/osm_subnet.c (working copy)
@@ -596,7 +596,7 @@ __osm_subn_opts_unpack_charp(
p_key, p_val_str);
printf(buff);
cl_log_event("OpenSM", LOG_INFO, buff, NULL, 0);
- *p_val = (char *)cl_malloc(strlen(p_val_str));
+ *p_val = (char *)cl_malloc( strlen(p_val_str) +1 );
strcpy( *p_val, p_val_str);
}
}
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general