ssl/ssl_lib.c:2227: error: BUFFER_OVERRUN_L2
  Offset: [0, 7] Size: 7.
Showing all 8 steps of the trace


ssl/ssl_lib.c:2220:9: <Offset trace>
2218.   #endif
2219.   
2220.       i = ssl_get_server_cert_index(s);
                ^
2221.   
2222.       /* This may or may not be an error. */

ssl/ssl_lib.c:2220:9: Call
2218.   #endif
2219.   
2220.       i = ssl_get_server_cert_index(s);
                ^
2221.   
2222.       /* This may or may not be an error. */

ssl/ssl_lib.c:2185:9: Assignment
  2183.       idx = ssl_cipher_get_cert_index(s->s3->tmp.new_cipher);
  2184.       if (idx == SSL_PKEY_RSA_ENC && !s->cert->pkeys[SSL_PKEY_RSA_ENC].x509)
  2185.           idx = SSL_PKEY_RSA_SIGN;
                  ^
  2186.       if (idx == SSL_PKEY_GOST_EC) {
  2187.           if (s->cert->pkeys[SSL_PKEY_GOST12_512].x509)

ssl/ssl_lib.c:2198:5: Assignment
  2196.       if (idx == -1)
  2197.           SSLerr(SSL_F_SSL_GET_SERVER_CERT_INDEX, ERR_R_INTERNAL_ERROR);
  2198.       return idx;
              ^
  2199.   }
  2200.   

ssl/ssl_lib.c:2220:5: Assignment
2218.   #endif
2219.   
2220.       i = ssl_get_server_cert_index(s);
            ^
2221.   
2222.       /* This may or may not be an error. */

ssl/ssl_lib.c:2201:1: <Length trace>
2199.   }
2200.   
2201. > CERT_PKEY *ssl_get_server_send_pkey(SSL *s)
2202.   {
2203.       CERT *c;

ssl/ssl_lib.c:2201:1: Parameter `s->cert->pkeys[*]`
2199.   }
2200.   
2201. > CERT_PKEY *ssl_get_server_send_pkey(SSL *s)
2202.   {
2203.       CERT *c;

ssl/ssl_lib.c:2227:5: Array access: Offset: [0, 7] Size: 7
2225.   
2226.       /* May be NULL. */
2227.       return &c->pkeys[i];
            ^
2228.   }
2229.   

CERT_PKEY *ssl_get_server_send_pkey(SSL *s)
{
    CERT *c;
    int i;
    c = s->cert;
    if (!s->s3 || !s->s3->tmp.new_cipher)
        return NULL;
    ssl_set_masks(s, s->s3->tmp.new_cipher);
#ifdef OPENSSL_SSL_DEBUG_BROKEN_PROTOCOL
    if (c->cert_flags & SSL_CERT_FLAG_BROKEN_PROTOCOL)
        return c->key;
#endif
    i = ssl_get_server_cert_index(s);
    if (i < 0)
        return NULL;
    return &c->pkeys[i];
}
['CERT_PKEY *ssl_get_server_send_pkey(SSL *s)\n{\n    CERT *c;\n    int i;\n    c = s->cert;\n    if (!s->s3 || !s->s3->tmp.new_cipher)\n        return NULL;\n    ssl_set_masks(s, s->s3->tmp.new_cipher);\n#ifdef OPENSSL_SSL_DEBUG_BROKEN_PROTOCOL\n    if (c->cert_flags & SSL_CERT_FLAG_BROKEN_PROTOCOL)\n        return c->key;\n#endif\n    i = ssl_get_server_cert_index(s);\n    if (i < 0)\n        return NULL;\n    return &c->pkeys[i];\n}', 'static int ssl_get_server_cert_index(const SSL *s)\n{\n    int idx;\n    idx = ssl_cipher_get_cert_index(s->s3->tmp.new_cipher);\n    if (idx == SSL_PKEY_RSA_ENC && !s->cert->pkeys[SSL_PKEY_RSA_ENC].x509)\n        idx = SSL_PKEY_RSA_SIGN;\n    if (idx == SSL_PKEY_GOST_EC) {\n        if (s->cert->pkeys[SSL_PKEY_GOST12_512].x509)\n            idx = SSL_PKEY_GOST12_512;\n        else if (s->cert->pkeys[SSL_PKEY_GOST12_256].x509)\n            idx = SSL_PKEY_GOST12_256;\n        else if (s->cert->pkeys[SSL_PKEY_GOST01].x509)\n            idx = SSL_PKEY_GOST01;\n        else\n            idx = -1;\n    }\n    if (idx == -1)\n        SSLerr(SSL_F_SSL_GET_SERVER_CERT_INDEX, ERR_R_INTERNAL_ERROR);\n    return idx;\n}']