]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
guile: Remove trailing zero in 'gnutls_server_name_set' call.
authorLudovic Courtès <ludo@gnu.org>
Tue, 14 Oct 2014 20:33:10 +0000 (22:33 +0200)
committerLudovic Courtès <ludo@gnu.org>
Tue, 14 Oct 2014 20:35:45 +0000 (22:35 +0200)
In GnuTLS 3.2.19 (and possibly 3.3.9 and 3.1.17),
'set-session-server-name!' would pass a trailing nul character on the
wire after the server name, which would thus be rejected by servers.

guile/src/core.c

index 82fd5734327ef96f2e8d11db708119a55c0b960c..2778205fe628a68ce8de37df8380576e0fc6b226 100644 (file)
@@ -719,7 +719,7 @@ SCM_DEFINE (scm_gnutls_set_session_server_name_x, "set-session-server-name!",
   c_name = scm_to_locale_string (name);
 
   err = gnutls_server_name_set (c_session, c_type, c_name,
-                               strlen (c_name) + 1);
+                               strlen (c_name));
   free (c_name);
 
   if (EXPECT_FALSE (err != GNUTLS_E_SUCCESS))