Appease gcc's Wmaybe-uninitialized

False positive: gcc (4.8) can't figure out the SSL_IS_DTLS logic.

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Emilia Kasper 2015-10-15 13:27:55 +02:00
parent 6f73d28c20
commit bbafa47b55

View file

@ -883,6 +883,7 @@ int ssl3_get_client_hello(SSL *s)
is_v2_record = RECORD_LAYER_is_sslv2_record(&s->rlayer); is_v2_record = RECORD_LAYER_is_sslv2_record(&s->rlayer);
PACKET_null_init(&cookie);
/* First lets get s->client_version set correctly */ /* First lets get s->client_version set correctly */
if (is_v2_record) { if (is_v2_record) {
unsigned int version; unsigned int version;
@ -1052,8 +1053,6 @@ int ssl3_get_client_hello(SSL *s)
PACKET_null_init(&compression); PACKET_null_init(&compression);
PACKET_null_init(&extensions); PACKET_null_init(&extensions);
/* We're never DTLS here but just play safe and initialize. */
PACKET_null_init(&cookie);
} else { } else {
/* Regular ClientHello. */ /* Regular ClientHello. */
if (!PACKET_copy_bytes(&pkt, s->s3->client_random, SSL3_RANDOM_SIZE) if (!PACKET_copy_bytes(&pkt, s->s3->client_random, SSL3_RANDOM_SIZE)