[gnutls-dev] minor bug in debugging output

Mark McLoughlin mark at skynet.ie
Thu Oct 16 20:23:38 CEST 2003


Hi,
	Here's a trivial fix for a bug with the debugging output in
gnutls_handshake.c.

Thanks,
Mark.

Index: gnutls_handshake.c
===================================================================
RCS file: /cvs/gnutls/gnutls/lib/gnutls_handshake.c,v
retrieving revision 2.201
diff -u -p -r2.201 gnutls_handshake.c
--- gnutls_handshake.c	1 Oct 2003 15:11:26 -0000	2.201
+++ gnutls_handshake.c	16 Oct 2003 18:11:53 -0000
@@ -551,12 +552,12 @@ int _gnutls_server_select_suite(gnutls_s
 	}
 
 #ifdef HANDSHAKE_DEBUG
-	memcpy( &cs.CipherSuite, &data[j], 2);
-
 	_gnutls_handshake_log("HSK[%x]: Requested cipher suites: \n", session);
-	for (j = 0; j < datalen; j += 2)
+	for (j = 0; j < datalen; j += 2) {
+		memcpy( &cs.CipherSuite, &data[j], 2);
 		_gnutls_handshake_log("\t%s\n",
 			    _gnutls_cipher_suite_get_name(cs));
+	}
 	_gnutls_handshake_log("HSK[%x]: Supported cipher suites: \n", session);
 	for (j = 0; j < x; j++)
 		_gnutls_handshake_log("\t%s\n",






More information about the Gnutls-dev mailing list