CVS muscleTool

CVS User rousseau ludovic.rousseau@free.fr
Wed, 01 Sep 2004 13:16:49 -0600


Update of /cvsroot/muscleapps/muscleTool
In directory haydn:/tmp/cvs-serv3527

Modified Files:
	muscleTool.c 
Log Message:
use sizeof() instead of strlen() for adminKeyLength since the key is a
binary array and not a NULL terminated string.

Thanks to Bruce Barnett for the bug report.


--- /cvsroot/muscleapps/muscleTool/muscleTool.c	2004/08/26 19:41:34	1.39
+++ /cvsroot/muscleapps/muscleTool/muscleTool.c	2004/09/01 19:16:48	1.40
@@ -1417,12 +1417,12 @@
 	if (transportKeyChoice == 1)
 	{
 		adminKey = defaultCFlexKey;
-		adminKeyLength = 8;
+		adminKeyLength = sizeof(defaultCFlexKey);
 	}
 	else if (transportKeyChoice == 2)
 	{
 		adminKey = muscleCFlexKey;
-		adminKeyLength = strlen((char *)adminKey);
+		adminKeyLength = sizeof(muscleCFlexKey);
 	}
 	else if (transportKeyChoice == 3)
 	{