]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Account the length byte in SRP extension.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 4 May 2014 21:39:48 +0000 (23:39 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 5 May 2014 17:20:57 +0000 (19:20 +0200)
Issue identified using valgrind and the Codenomicon TLS test suite.

lib/ext/srp.c

index ca5710ed7088330ee3483552acbd53f7afb192c3..45f702a6139509cb340b3e5157c144f4e1766480 100644 (file)
@@ -66,6 +66,8 @@ _gnutls_srp_recv_params(gnutls_session_t session, const uint8_t * data,
 
        if (session->security_parameters.entity == GNUTLS_SERVER) {
                if (data_size > 0) {
+                       DECR_LEN(data_size, 1);
+
                        len = data[0];
                        DECR_LEN(data_size, len);