test/ct_test.c:523: error: BUFFER_OVERRUN_L3
  Offset: 3 (⇐ 2 + 1) Size: [1, 300] by call to `SCT_new_from_base64`.
Showing all 13 steps of the trace


test/ct_test.c:516:5: Array declaration
514.       const uint64_t timestamp = 1;
515.       const char extensions[] = "";
516.       const char signature[] = "BAMARzBAMiBIL2dRrzXbplQ2vh/WZA89v5pBQpSVkkUwKI+j5"
           ^
517.               "eI+BgIhAOTtwNs6xXKx4vXoq2poBlOYfc9BAn3+/6EFUZ2J7b8I";
518.       SCT *sct = NULL;

test/ct_test.c:523:11: Call
521.   
522.       fixture.sct_list = sk_SCT_new_null();
523.       sct = SCT_new_from_base64(SCT_VERSION_V1, log_id,
                 ^
524.                                 CT_LOG_ENTRY_TYPE_X509, timestamp,
525.                                 extensions, signature);

crypto/ct/ct_b64.c:60:1: Parameter `signature_base64->strlen`
  58.   }
  59.   
  60. > SCT *SCT_new_from_base64(unsigned char version, const char *logid_base64,
  61.                            ct_log_entry_type_t entry_type, uint64_t timestamp,
  62.                            const char *extensions_base64,

crypto/ct/ct_b64.c:101:14: Call
  99.       dec = NULL;
  100.   
  101.       declen = ct_base64_decode(signature_base64, &dec);
                      ^
  102.       if (declen < 0) {
  103.           CTerr(CT_F_SCT_NEW_FROM_BASE64, X509_R_BASE64_DECODE_ERROR);

crypto/ct/ct_b64.c:24:1: Parameter `**out`
    22.    * the caller. Do not provide a pre-allocated string in |out|.
    23.    */
    24. > static int ct_base64_decode(const char *in, unsigned char **out)
    25.   {
    26.       size_t inlen = strlen(in);

crypto/ct/ct_b64.c:107:5: Assignment
  105.       }
  106.   
  107.       p = dec;
             ^
  108.       if (o2i_SCT_signature(sct, &p, declen) <= 0)
  109.           goto err;

crypto/ct/ct_b64.c:108:9: Call
  106.   
  107.       p = dec;
  108.       if (o2i_SCT_signature(sct, &p, declen) <= 0)
                 ^
  109.           goto err;
  110.       OPENSSL_free(dec);

crypto/ct/ct_oct.c:24:1: <Length trace>
22.   #include "ct_locl.h"
23.   
24. > int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len)
25.   {
26.       size_t siglen;

crypto/ct/ct_oct.c:24:1: Parameter `**in`
    22.   #include "ct_locl.h"
    23.   
    24. > int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len)
    25.   {
    26.       size_t siglen;

crypto/ct/ct_oct.c:46:5: Assignment
    44.       }
    45.   
    46.       p = *in;
              ^
    47.       /* Get hash and signature algorithm */
    48.       sct->hash_alg = *p++;

crypto/ct/ct_oct.c:48:22: Assignment
    46.       p = *in;
    47.       /* Get hash and signature algorithm */
    48.       sct->hash_alg = *p++;
                               ^
    49.       sct->sig_alg = *p++;
    50.       if (SCT_get_signature_nid(sct) == NID_undef) {

crypto/ct/ct_oct.c:49:21: Assignment
    47.       /* Get hash and signature algorithm */
    48.       sct->hash_alg = *p++;
    49.       sct->sig_alg = *p++;
                              ^
    50.       if (SCT_get_signature_nid(sct) == NID_undef) {
    51.           CTerr(CT_F_O2I_SCT_SIGNATURE, CT_R_SCT_INVALID_SIGNATURE);

crypto/ct/ct_oct.c:55:5: Array access: Offset: 3 (⇐ 2 + 1) Size: [1, 300] by call to `SCT_new_from_base64` 
    53.       }
    54.       /* Retrieve signature and check it is consistent with the buffer length */
    55.       n2s(p, siglen);
              ^
    56.       len_remaining -= (p - *in);
    57.       if (siglen > len_remaining) {
