From: schnorr Date: Tue, 31 Jul 2012 20:06:02 +0000 (+0200) Subject: [trace] make sure variable is zeroed before writing on it X-Git-Tag: v3_8~242 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/80007ae1f0a54d62e4703e30474ce6b9295647d0?hp=25eb2633edd0a603c2e5b1f722d37995fb8c2969 [trace] make sure variable is zeroed before writing on it --- diff --git a/src/instr/instr_smpi.c b/src/instr/instr_smpi.c index 060f0a98c2..b0e8dc1f8c 100644 --- a/src/instr/instr_smpi.c +++ b/src/instr/instr_smpi.c @@ -231,6 +231,7 @@ void TRACE_smpi_send(int rank, int src, int dst) if (!TRACE_smpi_is_enabled()) return; char key[INSTR_DEFAULT_STR_SIZE]; + bzero (key, INSTR_DEFAULT_STR_SIZE); TRACE_smpi_put_key(src, dst, key, INSTR_DEFAULT_STR_SIZE); char str[INSTR_DEFAULT_STR_SIZE]; @@ -246,6 +247,7 @@ void TRACE_smpi_recv(int rank, int src, int dst) if (!TRACE_smpi_is_enabled()) return; char key[INSTR_DEFAULT_STR_SIZE]; + bzero (key, INSTR_DEFAULT_STR_SIZE); TRACE_smpi_get_key(src, dst, key, INSTR_DEFAULT_STR_SIZE); char str[INSTR_DEFAULT_STR_SIZE];