]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
mbedtls: fix compile when h2-enabled
authorDaniel Stenberg <daniel@haxx.se>
Thu, 28 Apr 2022 15:11:50 +0000 (17:11 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 28 Apr 2022 15:11:50 +0000 (17:11 +0200)
Fixes #8766
Reported-by: LigH-de on github
Closes #8768

lib/vtls/mbedtls.c

index 64f57c5d83215bbe05a07a44909adc3652db9624..5f9b87e6b75bc9f69514c6965743574bc88da3b4 100644 (file)
@@ -815,8 +815,8 @@ mbed_connect_step2(struct Curl_easy *data, struct connectdata *conn,
     if(next_protocol) {
       infof(data, VTLS_INFOF_ALPN_ACCEPTED_1STR, next_protocol);
 #ifdef USE_HTTP2
-      if(!strncmp(next_protocol, ALPN_H2, ALPN_H2_LEN) &&
-         !next_protocol[ALPN_H2_LEN]) {
+      if(!strncmp(next_protocol, ALPN_H2, ALPN_H2_LENGTH) &&
+         !next_protocol[ALPN_H2_LENGTH]) {
         conn->negnpn = CURL_HTTP_VERSION_2;
       }
       else