Now that we can use size_t in PACKET lets use it
authorMatt Caswell <matt@openssl.org>
Wed, 19 Oct 2016 15:28:12 +0000 (16:28 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 4 Nov 2016 12:09:46 +0000 (12:09 +0000)
Reviewed-by: Rich Salz <rsalz@openssl.org>
ssl/statem/statem_clnt.c

index bde5373fe74594914393fbb62e0658de71a6c560..d8fbf582e6d64ff31bd103f5463e41107ad2822e 100644 (file)
@@ -1973,7 +1973,6 @@ MSG_PROCESS_RETURN tls_process_new_session_ticket(SSL *s, PACKET *pkt)
 MSG_PROCESS_RETURN tls_process_cert_status(SSL *s, PACKET *pkt)
 {
     int al;
-    unsigned long resplenl;
     size_t resplen;
     unsigned int type;
 
@@ -1983,13 +1982,12 @@ MSG_PROCESS_RETURN tls_process_cert_status(SSL *s, PACKET *pkt)
         SSLerr(SSL_F_TLS_PROCESS_CERT_STATUS, SSL_R_UNSUPPORTED_STATUS_TYPE);
         goto f_err;
     }
-    if (!PACKET_get_net_3(pkt, &resplenl)
-        || PACKET_remaining(pkt) != resplenl) {
+    if (!PACKET_get_net_3_len(pkt, &resplen)
+        || PACKET_remaining(pkt) != resplen) {
         al = SSL_AD_DECODE_ERROR;
         SSLerr(SSL_F_TLS_PROCESS_CERT_STATUS, SSL_R_LENGTH_MISMATCH);
         goto f_err;
     }
-    resplen = resplenl;
     s->tlsext_ocsp_resp = OPENSSL_malloc(resplen);
     if (s->tlsext_ocsp_resp == NULL) {
         al = SSL_AD_INTERNAL_ERROR;