test/danetest.c:395: error: BUFFER_OVERRUN_L3
  Offset: [0, 2] Size: [0, +oo] by call to `SSL_CTX_dane_mtype_set`.
Showing all 12 steps of the trace


test/danetest.c:393:17: Call
391.       if (!TEST_ptr(f = BIO_new_file(tlsafile, "r"))
392.               || !TEST_ptr(ctx = SSL_CTX_new(TLS_client_method()))
393.               || !TEST_int_gt(SSL_CTX_dane_enable(ctx), 0)
                       ^
394.               || !TEST_true(SSL_CTX_load_verify_locations(ctx, CAfile, NULL))
395.               || !TEST_int_gt(SSL_CTX_dane_mtype_set(ctx, EVP_sha512(), 2, 1),

ssl/ssl_lib.c:807:1: Parameter `*ctx->dane.mdord`
  805.   }
  806.   
  807. > int SSL_CTX_dane_enable(SSL_CTX *ctx)
  808.   {
  809.       return dane_ctx_enable(&ctx->dane);

ssl/ssl_lib.c:809:12: Call
  807.   int SSL_CTX_dane_enable(SSL_CTX *ctx)
  808.   {
  809.       return dane_ctx_enable(&ctx->dane);
                    ^
  810.   }
  811.   

ssl/ssl_lib.c:108:1: Parameter `*dctx->mdord`
    106.   };
    107.   
    108. > static int dane_ctx_enable(struct dane_ctx_st *dctx)
    109.   {
    110.       const EVP_MD **mdevp;

test/danetest.c:395:17: Call
393.               || !TEST_int_gt(SSL_CTX_dane_enable(ctx), 0)
394.               || !TEST_true(SSL_CTX_load_verify_locations(ctx, CAfile, NULL))
395.               || !TEST_int_gt(SSL_CTX_dane_mtype_set(ctx, EVP_sha512(), 2, 1),
                       ^
396.                               0)
397.               || !TEST_int_gt(SSL_CTX_dane_mtype_set(ctx, EVP_sha256(), 1, 2),

ssl/ssl_lib.c:935:1: Parameter `mtype`
  933.   }
  934.   
  935. > int SSL_CTX_dane_mtype_set(SSL_CTX *ctx, const EVP_MD *md, uint8_t mtype,
  936.                              uint8_t ord)
  937.   {

ssl/ssl_lib.c:938:12: Call
  936.                              uint8_t ord)
  937.   {
  938.       return dane_mtype_set(&ctx->dane, md, mtype, ord);
                    ^
  939.   }
  940.   

ssl/ssl_lib.c:213:1: <Offset trace>
211.   }
212.   
213. > static int dane_mtype_set(struct dane_ctx_st *dctx,
214.                             const EVP_MD *md, uint8_t mtype, uint8_t ord)
215.   {

ssl/ssl_lib.c:213:1: Parameter `mtype`
    211.   }
    212.   
    213. > static int dane_mtype_set(struct dane_ctx_st *dctx,
    214.                             const EVP_MD *md, uint8_t mtype, uint8_t ord)
    215.   {

ssl/ssl_lib.c:213:1: <Length trace>
211.   }
212.   
213. > static int dane_mtype_set(struct dane_ctx_st *dctx,
214.                             const EVP_MD *md, uint8_t mtype, uint8_t ord)
215.   {

ssl/ssl_lib.c:213:1: Parameter `*dctx->mdord`
    211.   }
    212.   
    213. > static int dane_mtype_set(struct dane_ctx_st *dctx,
    214.                             const EVP_MD *md, uint8_t mtype, uint8_t ord)
    215.   {

ssl/ssl_lib.c:253:5: Array access: Offset: [0, 2] Size: [0, +oo] by call to `SSL_CTX_dane_mtype_set` 
    251.       dctx->mdevp[mtype] = md;
    252.       /* Coerce ordinal of disabled matching types to 0 */
    253.       dctx->mdord[mtype] = (md == NULL) ? 0 : ord;
               ^
    254.   
    255.       return 1;
