diff options
-rw-r--r-- | ssl/t1_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index a20e85fb4b..98e9afb20a 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2333,11 +2333,11 @@ int ssl_parse_clienthello_tlsext(SSL *s, PACKET *pkt) */ static char ssl_next_proto_validate(PACKET *pkt) { - unsigned int len; + PACKET tmp_protocol; while (PACKET_remaining(pkt)) { - if (!PACKET_get_1(pkt, &len) - || !PACKET_forward(pkt, len)) + if (!PACKET_get_length_prefixed_1(pkt, &tmp_protocol) + || PACKET_remaining(&tmp_protocol) == 0) return 0; } |