ssl/statem/extensions.c:1050: error: UNINITIALIZED_VALUE
  The value read from group_id was never initialized.
Showing all 1 steps of the trace


ssl/statem/extensions.c:1050:17: 
1048.               if (i < num_curves) {
1049.                   /* A shared group exists so send a HelloRetryRequest */
1050. >                 s->s3->group_id = group_id;
1051.                   s->hello_retry_request = 1;
1052.                   return 1;

static int final_key_share(SSL *s, unsigned int context, int sent, int *al)
{
    if (!SSL_IS_TLS13(s))
        return 1;
    if (!s->server
            && !sent
            && (!s->hit
                || (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE) == 0)) {
        *al = SSL_AD_HANDSHAKE_FAILURE;
        SSLerr(SSL_F_FINAL_KEY_SHARE, SSL_R_NO_SUITABLE_KEY_SHARE);
        return 0;
    }
    if (s->server && s->s3->peer_tmp == NULL) {
        if (s->hello_retry_request == 0 && sent
                && (!s->hit
                    || (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE_DHE)
                       != 0)) {
            const unsigned char *pcurves, *pcurvestmp, *clntcurves;
            size_t num_curves, clnt_num_curves, i;
            unsigned int group_id;
            if (!tls1_get_curvelist(s, 1, &clntcurves, &clnt_num_curves)) {
                *al = SSL_AD_INTERNAL_ERROR;
                SSLerr(SSL_F_FINAL_KEY_SHARE, ERR_R_INTERNAL_ERROR);
                return 0;
            }
            if (!tls1_get_curvelist(s, 0, &pcurves, &num_curves)) {
                *al = SSL_AD_INTERNAL_ERROR;
                SSLerr(SSL_F_FINAL_KEY_SHARE, ERR_R_INTERNAL_ERROR);
                return 0;
            }
            for (i = 0, pcurvestmp = pcurves; i < num_curves;
                 i++, pcurvestmp += 2) {
                group_id = pcurvestmp[0] << 8 | pcurvestmp[1];
                if (check_in_list(s, group_id, clntcurves, clnt_num_curves, 1))
                    break;
            }
            if (i < num_curves) {
                s->s3->group_id = group_id;
                s->hello_retry_request = 1;
                return 1;
            }
        }
        if (!s->hit
                || (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE) == 0) {
            *al = SSL_AD_HANDSHAKE_FAILURE;
            SSLerr(SSL_F_FINAL_KEY_SHARE, SSL_R_NO_SUITABLE_KEY_SHARE);
            return 0;
        }
    }
    if (s->server)
        s->hello_retry_request = 0;
    if (!sent && !s->server && !tls13_generate_handshake_secret(s, NULL, 0)) {
        *al = SSL_AD_INTERNAL_ERROR;
        SSLerr(SSL_F_FINAL_KEY_SHARE, ERR_R_INTERNAL_ERROR);
        return 0;
    }
    return 1;
}
['static int final_key_share(SSL *s, unsigned int context, int sent, int *al)\n{\n    if (!SSL_IS_TLS13(s))\n        return 1;\n    if (!s->server\n            && !sent\n            && (!s->hit\n                || (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE) == 0)) {\n        *al = SSL_AD_HANDSHAKE_FAILURE;\n        SSLerr(SSL_F_FINAL_KEY_SHARE, SSL_R_NO_SUITABLE_KEY_SHARE);\n        return 0;\n    }\n    if (s->server && s->s3->peer_tmp == NULL) {\n        if (s->hello_retry_request == 0 && sent\n                && (!s->hit\n                    || (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE_DHE)\n                       != 0)) {\n            const unsigned char *pcurves, *pcurvestmp, *clntcurves;\n            size_t num_curves, clnt_num_curves, i;\n            unsigned int group_id;\n            if (!tls1_get_curvelist(s, 1, &clntcurves, &clnt_num_curves)) {\n                *al = SSL_AD_INTERNAL_ERROR;\n                SSLerr(SSL_F_FINAL_KEY_SHARE, ERR_R_INTERNAL_ERROR);\n                return 0;\n            }\n            if (!tls1_get_curvelist(s, 0, &pcurves, &num_curves)) {\n                *al = SSL_AD_INTERNAL_ERROR;\n                SSLerr(SSL_F_FINAL_KEY_SHARE, ERR_R_INTERNAL_ERROR);\n                return 0;\n            }\n            for (i = 0, pcurvestmp = pcurves; i < num_curves;\n                 i++, pcurvestmp += 2) {\n                group_id = pcurvestmp[0] << 8 | pcurvestmp[1];\n                if (check_in_list(s, group_id, clntcurves, clnt_num_curves, 1))\n                    break;\n            }\n            if (i < num_curves) {\n                s->s3->group_id = group_id;\n                s->hello_retry_request = 1;\n                return 1;\n            }\n        }\n        if (!s->hit\n                || (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE) == 0) {\n            *al = SSL_AD_HANDSHAKE_FAILURE;\n            SSLerr(SSL_F_FINAL_KEY_SHARE, SSL_R_NO_SUITABLE_KEY_SHARE);\n            return 0;\n        }\n    }\n    if (s->server)\n        s->hello_retry_request = 0;\n    if (!sent && !s->server && !tls13_generate_handshake_secret(s, NULL, 0)) {\n        *al = SSL_AD_INTERNAL_ERROR;\n        SSLerr(SSL_F_FINAL_KEY_SHARE, ERR_R_INTERNAL_ERROR);\n        return 0;\n    }\n    return 1;\n}']