diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-02-06 23:35:02 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-02-06 23:35:02 +0100 |
commit | cd3ccd8c971ac619414452073e77aa02d8e562fa (patch) | |
tree | da7abae3085a190fafd39616003d6d578bea1ba3 | |
parent | 2e95b2fcdb67b8dcb81919fe2946e311ddb6a6d6 (diff) | |
download | gnutls-cd3ccd8c971ac619414452073e77aa02d8e562fa.tar.gz |
do not use strlen for fixed string.
-rw-r--r-- | lib/gnutls_kx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gnutls_kx.c b/lib/gnutls_kx.c index 99be1f4635..9111aa4db9 100644 --- a/lib/gnutls_kx.c +++ b/lib/gnutls_kx.c @@ -75,6 +75,7 @@ send_handshake (gnutls_session_t session, opaque * data, size_t size, */ #define MASTER_SECRET "master secret" +#define MASTER_SECRET_SIZE (sizeof(MASTER_SECRET)-1) static int generate_normal_master (gnutls_session_t session, int); int @@ -134,7 +135,7 @@ generate_normal_master (gnutls_session_t session, int keep_premaster) ret = _gnutls_PRF (session, PREMASTER.data, PREMASTER.size, - MASTER_SECRET, strlen (MASTER_SECRET), + MASTER_SECRET, MASTER_SECRET_SIZE, rnd, 2 * GNUTLS_RANDOM_SIZE, GNUTLS_MASTER_SIZE, session->security_parameters.master_secret); } |