test/tls13encryptiontest.c:318: error: BUFFER_OVERRUN_L3
  Offset added: 8 Size: [1, +oo] by call to `load_record`.
Showing all 9 steps of the trace


test/tls13encryptiontest.c:348:13: Call
346.   
347.           /* Decrypt it */
348.           if (tls13_enc(s, &rec, 1, 0) != 1) {
                   ^
349.               fprintf(stderr, "Failed to decrypt record %"OSSLzu"\n", ctr);
350.               goto err;

ssl/record/ssl3_record_tls13.c:23:1: Parameter `recs->data->strlen`
  21.    *       an internal error occurred.
  22.    */
  23. > int tls13_enc(SSL *s, SSL3_RECORD *recs, size_t n_recs, int send)
  24.   {
  25.       EVP_CIPHER_CTX *ctx;

test/tls13encryptiontest.c:318:14: Call
316.           /* Load the record */
317.           ivlen = EVP_CIPHER_iv_length(ciph);
318.           if (!load_record(&rec, &refdata[ctr], &key, s->read_iv, ivlen,
                    ^
319.                            RECORD_LAYER_get_read_sequence(&s->rlayer))) {
320.               fprintf(stderr, "Failed loading key into EVP_CIPHER_CTX\n");

test/tls13encryptiontest.c:214:1: <Length trace>
212.   }
213.   
214. > static int load_record(SSL3_RECORD *rec, RECORD_DATA *recd, unsigned char **key,
215.                          unsigned char *iv, size_t ivlen, unsigned char *seq)
216.   {

test/tls13encryptiontest.c:214:1: Parameter `recd->seq->strlen`
  212.   }
  213.   
  214. > static int load_record(SSL3_RECORD *rec, RECORD_DATA *recd, unsigned char **key,
  215.                          unsigned char *iv, size_t ivlen, unsigned char *seq)
  216.   {

test/tls13encryptiontest.c:222:10: Call
  220.       *key = OPENSSL_hexstr2buf(recd->key, NULL);
  221.       ivtmp = OPENSSL_hexstr2buf(recd->iv, NULL);
  222.       sq = OPENSSL_hexstr2buf(recd->seq, NULL);
                  ^
  223.       pt = multihexstr2buf(recd->plaintext, &ptlen);
  224.   

crypto/o_str.c:161:9: Assignment
    159.       if ((hexbuf = OPENSSL_malloc(s >> 1)) == NULL) {
    160.           CRYPTOerr(CRYPTO_F_OPENSSL_HEXSTR2BUF, ERR_R_MALLOC_FAILURE);
    161.           return NULL;
                   ^
    162.       }
    163.       for (p = (const unsigned char *)str, q = hexbuf; *p; ) {

test/tls13encryptiontest.c:222:5: Assignment
  220.       *key = OPENSSL_hexstr2buf(recd->key, NULL);
  221.       ivtmp = OPENSSL_hexstr2buf(recd->iv, NULL);
  222.       sq = OPENSSL_hexstr2buf(recd->seq, NULL);
             ^
  223.       pt = multihexstr2buf(recd->plaintext, &ptlen);
  224.   

test/tls13encryptiontest.c:236:5: Array access: Offset added: 8 Size: [1, +oo] by call to `load_record` 
  234.       memcpy(rec->data, pt, ptlen);
  235.       OPENSSL_free(pt);
  236.       memcpy(seq, sq, SEQ_NUM_SIZE);
             ^
  237.       OPENSSL_free(sq);
  238.       memcpy(iv, ivtmp, ivlen);
