crypto/siphash/siphash_pmeth.c:146: error: BUFFER_OVERRUN_L3
  Offset: 15 (⇐ 8 + 7) Size: [0, +oo] by call to `SipHash_Init`.
Showing all 11 steps of the trace


crypto/siphash/siphash_pmeth.c:143:14: Call
141.           }
142.           if (key == NULL || len != SIPHASH_KEY_SIZE ||
143.               !ASN1_OCTET_STRING_set(&pctx->ktmp, key, len))
                    ^
144.               return 0;
145.           /* use default rounds (2,4) */

crypto/asn1/a_octet.c:25:1: Parameter `*x->data`
  23.   }
  24.   
  25. > int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *x, const unsigned char *d,
  26.                             int len)
  27.   {

crypto/asn1/a_octet.c:28:12: Call
  26.                             int len)
  27.   {
  28.       return ASN1_STRING_set(x, d, len);
                   ^
  29.   }

crypto/asn1/asn1_lib.c:271:1: Parameter `*str->data`
    269.   }
    270.   
    271. > int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
    272.   {
    273.       unsigned char *c;

crypto/siphash/siphash_pmeth.c:146:41: Call
144.               return 0;
145.           /* use default rounds (2,4) */
146.           return SipHash_Init(&pctx->ctx, ASN1_STRING_get0_data(&pctx->ktmp),
                                               ^
147.                               0, 0);
148.   

crypto/asn1/asn1_lib.c:381:1: Parameter `*x->data`
  379.   }
  380.   
  381. > const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x)
  382.   {
  383.       return x->data;

crypto/asn1/asn1_lib.c:383:5: Assignment
  381.   const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x)
  382.   {
  383.       return x->data;
             ^
  384.   }
  385.   

crypto/siphash/siphash_pmeth.c:146:16: Call
144.               return 0;
145.           /* use default rounds (2,4) */
146.           return SipHash_Init(&pctx->ctx, ASN1_STRING_get0_data(&pctx->ktmp),
                      ^
147.                               0, 0);
148.   

crypto/siphash/siphash.c:102:1: <Length trace>
100.   
101.   /* hash_size = crounds = drounds = 0 means SipHash24 with 16-byte output */
102. > int SipHash_Init(SIPHASH *ctx, const unsigned char *k, int crounds, int drounds)
103.   {
104.       uint64_t k0 = U8TO64_LE(k);

crypto/siphash/siphash.c:102:1: Parameter `*k`
  100.   
  101.   /* hash_size = crounds = drounds = 0 means SipHash24 with 16-byte output */
  102. > int SipHash_Init(SIPHASH *ctx, const unsigned char *k, int crounds, int drounds)
  103.   {
  104.       uint64_t k0 = U8TO64_LE(k);

crypto/siphash/siphash.c:105:19: Array access: Offset: 15 (⇐ 8 + 7) Size: [0, +oo] by call to `SipHash_Init` 
  103.   {
  104.       uint64_t k0 = U8TO64_LE(k);
  105.       uint64_t k1 = U8TO64_LE(k + 8);
                           ^
  106.   
  107.       /* If the hash size wasn't set, i.e. is zero */

int SipHash_Init(SIPHASH *ctx, const unsigned char *k, int crounds, int drounds)
{
    uint64_t k0 = U8TO64_LE(k);
    uint64_t k1 = U8TO64_LE(k + 8);
    ctx->hash_size = siphash_adjust_hash_size(ctx->hash_size);
    if (drounds == 0)
        drounds = SIPHASH_D_ROUNDS;
    if (crounds == 0)
        crounds = SIPHASH_C_ROUNDS;
    ctx->crounds = crounds;
    ctx->drounds = drounds;
    ctx->len = 0;
    ctx->total_inlen = 0;
    ctx->v0 = 0x736f6d6570736575ULL ^ k0;
    ctx->v1 = 0x646f72616e646f6dULL ^ k1;
    ctx->v2 = 0x6c7967656e657261ULL ^ k0;
    ctx->v3 = 0x7465646279746573ULL ^ k1;
    if (ctx->hash_size == SIPHASH_MAX_DIGEST_SIZE)
        ctx->v1 ^= 0xee;
    return 1;
}
['static int pkey_siphash_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)\n{\n    SIPHASH_PKEY_CTX *pctx = EVP_PKEY_CTX_get_data(ctx);\n    const unsigned char *key;\n    size_t len;\n    switch (type) {\n    case EVP_PKEY_CTRL_MD:\n        break;\n    case EVP_PKEY_CTRL_SET_DIGEST_SIZE:\n        return SipHash_set_hash_size(&pctx->ctx, p1);\n    case EVP_PKEY_CTRL_SET_MAC_KEY:\n    case EVP_PKEY_CTRL_DIGESTINIT:\n        if (type == EVP_PKEY_CTRL_SET_MAC_KEY) {\n            key = p2;\n            len = p1;\n        } else {\n            key = EVP_PKEY_get0_siphash(EVP_PKEY_CTX_get0_pkey(ctx), &len);\n        }\n        if (key == NULL || len != SIPHASH_KEY_SIZE ||\n            !ASN1_OCTET_STRING_set(&pctx->ktmp, key, len))\n            return 0;\n        return SipHash_Init(&pctx->ctx, ASN1_STRING_get0_data(&pctx->ktmp),\n                            0, 0);\n    default:\n        return -2;\n    }\n    return 1;\n}', 'int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *x, const unsigned char *d,\n                          int len)\n{\n    return ASN1_STRING_set(x, d, len);\n}', "int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)\n{\n    unsigned char *c;\n    const char *data = _data;\n    if (len < 0) {\n        if (data == NULL)\n            return 0;\n        else\n            len = strlen(data);\n    }\n    if ((str->length <= len) || (str->data == NULL)) {\n        c = str->data;\n        str->data = OPENSSL_realloc(c, len + 1);\n        if (str->data == NULL) {\n            ASN1err(ASN1_F_ASN1_STRING_SET, ERR_R_MALLOC_FAILURE);\n            str->data = c;\n            return 0;\n        }\n    }\n    str->length = len;\n    if (data != NULL) {\n        memcpy(str->data, data, len);\n        str->data[len] = '\\0';\n    }\n    return 1;\n}", 'const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x)\n{\n    return x->data;\n}', 'int SipHash_Init(SIPHASH *ctx, const unsigned char *k, int crounds, int drounds)\n{\n    uint64_t k0 = U8TO64_LE(k);\n    uint64_t k1 = U8TO64_LE(k + 8);\n    ctx->hash_size = siphash_adjust_hash_size(ctx->hash_size);\n    if (drounds == 0)\n        drounds = SIPHASH_D_ROUNDS;\n    if (crounds == 0)\n        crounds = SIPHASH_C_ROUNDS;\n    ctx->crounds = crounds;\n    ctx->drounds = drounds;\n    ctx->len = 0;\n    ctx->total_inlen = 0;\n    ctx->v0 = 0x736f6d6570736575ULL ^ k0;\n    ctx->v1 = 0x646f72616e646f6dULL ^ k1;\n    ctx->v2 = 0x6c7967656e657261ULL ^ k0;\n    ctx->v3 = 0x7465646279746573ULL ^ k1;\n    if (ctx->hash_size == SIPHASH_MAX_DIGEST_SIZE)\n        ctx->v1 ^= 0xee;\n    return 1;\n}']