test/tls13encryptiontest.c:363: error: BUFFER_OVERRUN_L3
  Offset: [2, +oo] Size: [1, +oo] by call to `test_record`.
Showing all 17 steps of the trace


test/tls13encryptiontest.c:339:14: Call
337.           /* Load the record */
338.           ivlen = EVP_CIPHER_iv_length(ciph);
339.           if (!load_record(&rec, &refdata[ctr], &key, s->read_iv, ivlen,
                    ^
340.                            RECORD_LAYER_get_read_sequence(&s->rlayer))) {
341.               TEST_error("Failed loading key into EVP_CIPHER_CTX");

test/tls13encryptiontest.c:233:1: Parameter `rec->length`
  231.   }
  232.   
  233. > static int load_record(SSL3_RECORD *rec, RECORD_DATA *recd, unsigned char **key,
  234.                          unsigned char *iv, size_t ivlen, unsigned char *seq)
  235.   {

test/tls13encryptiontest.c:359:14: Call
357.   
358.           /* Encrypt it */
359.           if (!TEST_size_t_eq(tls13_enc(s, &rec, 1, 1), 1)) {
                    ^
360.               TEST_info("Failed to encrypt record %zu", ctr);
361.               goto err;

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

test/tls13encryptiontest.c:363:14: Call
361.               goto err;
362.           }
363.           if (!TEST_true(test_record(&rec, &refdata[ctr], 1))) {
                    ^
364.               TEST_info("Record %zu encryption test failed", ctr);
365.               goto err;

test/tls13encryptiontest.c:270:1: Parameter `rec->length`
  268.   }
  269.   
  270. > static int test_record(SSL3_RECORD *rec, RECORD_DATA *recd, int enc)
  271.   {
  272.       int ret = 0;

test/tls13encryptiontest.c:286:10: Call
  284.       }
  285.   
  286.       if (!TEST_mem_eq(rec->data, rec->length, refd, refdatalen))
                  ^
  287.           goto err;
  288.   

test/testutil/tests.c:310:1: Parameter `n1`
    308.   }
    309.   
    310. > int test_mem_eq(const char *file, int line, const char *st1, const char *st2,
    311.                   const void *s1, size_t n1, const void *s2, size_t n2)
    312.   {

test/testutil/tests.c:318:20: Call
    316.           return 1;
    317.       if (n1 != n2 || s1 == NULL || s2 == NULL || memcmp(s1, s2, n1) != 0) {
    318.           char *m1 = print_mem_maybe_null(s1, n1, b1);
                              ^
    319.           char *m2 = print_mem_maybe_null(s2, n2, b2);
    320.   

test/testutil/tests.c:276:1: <Offset trace>
274.    * freed by the caller.
275.    */
276. > static char *print_mem_maybe_null(const void *s, size_t n,
277.                                     char outbuf[MEM_BUFFER_SIZE])
278.   {

test/testutil/tests.c:276:1: Parameter `n`
      274.    * freed by the caller.
      275.    */
      276. > static char *print_mem_maybe_null(const void *s, size_t n,
      277.                                     char outbuf[MEM_BUFFER_SIZE])
      278.   {

test/testutil/tests.c:301:13: Assignment
      299.       }
      300.       if (pad) {
      301.           out[i++] = '.';
                         ^
      302.           out[i++] = '.';
      303.           out[i++] = '.';

test/testutil/tests.c:302:13: Assignment
      300.       if (pad) {
      301.           out[i++] = '.';
      302.           out[i++] = '.';
                         ^
      303.           out[i++] = '.';
      304.       }

test/testutil/tests.c:276:1: <Length trace>
274.    * freed by the caller.
275.    */
276. > static char *print_mem_maybe_null(const void *s, size_t n,
277.                                     char outbuf[MEM_BUFFER_SIZE])
278.   {

test/testutil/tests.c:276:1: Parameter `*outbuf`
      274.    * freed by the caller.
      275.    */
      276. > static char *print_mem_maybe_null(const void *s, size_t n,
      277.                                     char outbuf[MEM_BUFFER_SIZE])
      278.   {

test/testutil/tests.c:281:5: Assignment
      279.       size_t i;
      280.       const unsigned char *p = (const unsigned char *)s;
      281.       char *out = outbuf;
                 ^
      282.       int pad = 2 * n >= MEM_BUFFER_SIZE;
      283.   

test/testutil/tests.c:303:9: Array access: Offset: [2, +oo] Size: [1, +oo] by call to `test_record` 
      301.           out[i++] = '.';
      302.           out[i++] = '.';
      303.           out[i++] = '.';
                     ^
      304.       }
      305.       out[i] = '\0';
