gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_3_1_3-32-g8fc6134


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_1_3-32-g8fc6134
Date: Wed, 31 Oct 2012 18:01:19 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=8fc613454022285610b0ac03eeeb3a6b9b8a0e15

The branch, master has been updated
       via  8fc613454022285610b0ac03eeeb3a6b9b8a0e15 (commit)
       via  d4b6bd3f3e61ff8af04f4d088718a8873512ca01 (commit)
      from  acca614b0f77ec74d403c1de67d69befa4242b5b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8fc613454022285610b0ac03eeeb3a6b9b8a0e15
Author: Martin Storsjo <address@hidden>
Date:   Wed Oct 31 15:45:15 2012 +0200

    server_name: Store the actual number of server names
    
    Earlier, if the number of set server names exceeded the maximum,
    the server_names field wasn't bounded to the maximum, which could
    lead to reading out of bounds in _gnutls_server_name_send_params.
    
    Signed-off-by: Nikos Mavrogiannopoulos <address@hidden>

commit d4b6bd3f3e61ff8af04f4d088718a8873512ca01
Author: Martin Storsjo <address@hidden>
Date:   Wed Oct 31 15:44:35 2012 +0200

    server_name: Return the actual required buffer size if the buffer is too 
small
    
    Since we require space for the null termination, include this in
    the info returned if the caller provided a too small buffer.
    Otherwise, if the caller allocated a buffer of exactly the suggested
    size, it would still be too small.
    
    Signed-off-by: Nikos Mavrogiannopoulos <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 lib/ext/server_name.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ext/server_name.c b/lib/ext/server_name.c
index 005d80b..de5fbe5 100644
--- a/lib/ext/server_name.c
+++ b/lib/ext/server_name.c
@@ -322,7 +322,7 @@ gnutls_server_name_get (gnutls_session_t session, void 
*data,
     }
   else
     {
-      *data_length = priv->server_names[indx].name_length;
+      *data_length = priv->server_names[indx].name_length + 1;
       return GNUTLS_E_SHORT_MEMORY_BUFFER;
     }
 
@@ -398,7 +398,7 @@ gnutls_server_name_set (gnutls_session_t session,
   memcpy (priv->server_names[server_names - 1].name, name, name_length);
   priv->server_names[server_names - 1].name_length = name_length;
 
-  priv->server_names_size++;
+  priv->server_names_size = server_names;
 
   if (set != 0)
     _gnutls_ext_set_session_data (session, GNUTLS_EXTENSION_SERVER_NAME,


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]