r2831 - trunk/libmikey/mikey

erik at minisip.org erik at minisip.org
Mon Oct 16 17:36:22 CEST 2006


Author: erik
Date: 2006-10-16 17:36:21 +0200 (Mon, 16 Oct 2006)
New Revision: 2831

Modified:
   trunk/libmikey/mikey/MikeyPayloadCERT.cxx
   trunk/libmikey/mikey/MikeyPayloadDH.cxx
   trunk/libmikey/mikey/MikeyPayloadHDR.cxx
   trunk/libmikey/mikey/MikeyPayloadID.cxx
   trunk/libmikey/mikey/MikeyPayloadPKE.cxx
   trunk/libmikey/mikey/MikeyPayloadSIGN.cxx
   trunk/libmikey/mikey/MikeyPayloadT.cxx
Log:

 * Bug fix: wrong parameter order (thanks to Philippe Torrelli for finding!)



Modified: trunk/libmikey/mikey/MikeyPayloadCERT.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyPayloadCERT.cxx	2006-10-16 15:22:07 UTC (rev 2830)
+++ trunk/libmikey/mikey/MikeyPayloadCERT.cxx	2006-10-16 15:36:21 UTC (rev 2831)
@@ -85,7 +85,7 @@
 void MikeyPayloadCERT::writeData( byte_t * start, int expectedLength ){
 
 	assert( expectedLength == length() );
-	memset( start, expectedLength, 0 );
+	memset( start, 0, expectedLength );
 	start[0] = nextPayloadType();
 	start[1] = type;
 	start[2] = (byte_t) ((certLengthValue & 0xFF00) >> 8);

Modified: trunk/libmikey/mikey/MikeyPayloadDH.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyPayloadDH.cxx	2006-10-16 15:22:07 UTC (rev 2830)
+++ trunk/libmikey/mikey/MikeyPayloadDH.cxx	2006-10-16 15:36:21 UTC (rev 2831)
@@ -139,7 +139,7 @@
 
 void MikeyPayloadDH::writeData( byte_t * start, int expectedLength ){
 	assert( expectedLength == length() );
-	memset( start, expectedLength, 0 );
+	memset( start, 0, expectedLength );
 	start[0] = nextPayloadType();
 	start[1] = dhGroup;
 	memcpy( &start[2], dhKeyPtr, dhKeyLengthValue );

Modified: trunk/libmikey/mikey/MikeyPayloadHDR.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyPayloadHDR.cxx	2006-10-16 15:22:07 UTC (rev 2830)
+++ trunk/libmikey/mikey/MikeyPayloadHDR.cxx	2006-10-16 15:36:21 UTC (rev 2831)
@@ -109,7 +109,7 @@
 
 void MikeyPayloadHDR::writeData( byte_t * start, int expectedLength ){
 	assert( expectedLength == length() );
-	memset( start, expectedLength, 0 );
+	memset( start, 0, expectedLength );
 	start[0] = (byte_t) version;
 	start[1] = (byte_t) dataTypeValue;
 	start[2] = nextPayloadType();

Modified: trunk/libmikey/mikey/MikeyPayloadID.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyPayloadID.cxx	2006-10-16 15:22:07 UTC (rev 2830)
+++ trunk/libmikey/mikey/MikeyPayloadID.cxx	2006-10-16 15:36:21 UTC (rev 2831)
@@ -75,7 +75,7 @@
 void MikeyPayloadID::writeData( byte_t * start, int expectedLength ){
 
 	assert( expectedLength == length() );
-	memset( start, expectedLength, 0 );
+	memset( start, 0, expectedLength );
 	start[0] = nextPayloadType();
 	start[1] = idTypeValue;
 	start[2] = (byte_t) ((idLengthValue & 0xFF00) >> 8);

Modified: trunk/libmikey/mikey/MikeyPayloadPKE.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyPayloadPKE.cxx	2006-10-16 15:22:07 UTC (rev 2830)
+++ trunk/libmikey/mikey/MikeyPayloadPKE.cxx	2006-10-16 15:36:21 UTC (rev 2831)
@@ -78,7 +78,7 @@
 
 void MikeyPayloadPKE::writeData( byte_t * start, int expectedLength ){
 	assert( expectedLength == length() );
-	memset( start, expectedLength, 0 );
+	memset( start, 0, expectedLength );
 	start[0] = (byte_t)nextPayloadType();
 	start[1] = (byte_t)
 		(( cValue & 0x3 ) << 6 | ( ( dataLengthValue >> 8 ) & 0x3F ));

Modified: trunk/libmikey/mikey/MikeyPayloadSIGN.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyPayloadSIGN.cxx	2006-10-16 15:22:07 UTC (rev 2830)
+++ trunk/libmikey/mikey/MikeyPayloadSIGN.cxx	2006-10-16 15:36:21 UTC (rev 2831)
@@ -81,7 +81,7 @@
 
 void MikeyPayloadSIGN::writeData( byte_t * start, int expectedLength ){
 	assert( expectedLength == length() );
-	memset( start, expectedLength, 0 );
+	memset( start, 0, expectedLength );
 	start[0] = (byte_t)((( sigLengthValue & 0x0F00 ) >> 8) |
 			((sigTypeValue << 4) & 0xF0)) ;
 	start[1] = (byte_t)( sigLengthValue & 0xFF );

Modified: trunk/libmikey/mikey/MikeyPayloadT.cxx
===================================================================
--- trunk/libmikey/mikey/MikeyPayloadT.cxx	2006-10-16 15:22:07 UTC (rev 2830)
+++ trunk/libmikey/mikey/MikeyPayloadT.cxx	2006-10-16 15:36:21 UTC (rev 2831)
@@ -142,7 +142,7 @@
 void MikeyPayloadT::writeData(byte_t *start, int expectedLength){
 	int i;
 	assert( expectedLength == length() );
-	memset( start, expectedLength, 0 );
+	memset( start, 0, expectedLength );
 	start[0] = nextPayloadType();
 	start[1] = (byte_t) tsTypeValue;
 	switch( tsTypeValue ){



More information about the Minisip-devel mailing list