Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] make sure variable is zeroed before writing on it
authorschnorr <Lucas.Schnorr@imag.fr>
Tue, 31 Jul 2012 20:06:02 +0000 (22:06 +0200)
committerschnorr <Lucas.Schnorr@imag.fr>
Tue, 31 Jul 2012 21:44:31 +0000 (23:44 +0200)
src/instr/instr_smpi.c

index 060f0a9..b0e8dc1 100644 (file)
@@ -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];