Commit 1608d658 authored by Todd Short's avatar Todd Short Committed by Richard Levitte
Browse files

Fix clang compile time error



|version| "could" be used uninitialized here, not really, but the
compiler doesn't understand the flow

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3373)
parent 37192a92
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
 */

#include <stdio.h>
#include <assert.h>
#include "ssl_locl.h"
#include "packet_locl.h"
#include <openssl/bio.h>
@@ -903,7 +904,7 @@ int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file)
    int ret = 0;
    BIO *bin = NULL;
    size_t num_extensions = 0, contextoff = 0;
    unsigned int version;
    unsigned int version = 0;

    if (ctx == NULL || file == NULL) {
        SSLerr(SSL_F_SSL_CTX_USE_SERVERINFO_FILE, ERR_R_PASSED_NULL_PARAMETER);
@@ -1009,6 +1010,8 @@ int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file)
        extension = NULL;
    }

    assert(version != 0);
    if (version != 0)
        ret = SSL_CTX_use_serverinfo_ex(ctx, version, serverinfo,
                                        serverinfo_length);
 end: