Fix a minor nit in the hkdflabel size
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 16 Dec 2018 11:43:59 +0000 (12:43 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 30 Dec 2018 16:22:12 +0000 (17:22 +0100)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7913)

(cherry picked from commit 0b4233f5a4a181a6dcb7c511cd2663e500e659a4)

ssl/tls13_enc.c

index c3021d18aa9a0a206c16171c0637f6ff8b5f3635..e36b7d3a066ad1363f3976a364d17025f21a486e 100644 (file)
@@ -41,7 +41,7 @@ int tls13_hkdf_expand(SSL *s, const EVP_MD *md, const unsigned char *secret,
      * + bytes for the hash itself
      */
     unsigned char hkdflabel[sizeof(uint16_t) + sizeof(uint8_t) +
-                            + sizeof(label_prefix) + TLS13_MAX_LABEL_LEN
+                            + (sizeof(label_prefix) - 1) + TLS13_MAX_LABEL_LEN
                             + 1 + EVP_MAX_MD_SIZE];
     WPACKET pkt;