crypto/poly1305/poly1305_pmeth.c:139: error: BUFFER_OVERRUN_L3
  Offset: 31 (⇐ 28 + 3) Size: [0, +oo] by call to `Poly1305_Init`.
Showing all 13 steps of the trace


crypto/poly1305/poly1305_pmeth.c:137:14: Call
135.           }
136.           if (key == NULL || len != POLY1305_KEY_SIZE ||
137.               !ASN1_OCTET_STRING_set(&pctx->ktmp, key, len))
                    ^
138.               return 0;
139.           Poly1305_Init(&pctx->ctx, ASN1_STRING_get0_data(&pctx->ktmp));

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:264:1: Parameter `*str->data`
    262.   }
    263.   
    264. > int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
    265.   {
    266.       unsigned char *c;

crypto/poly1305/poly1305_pmeth.c:139:35: Call
137.               !ASN1_OCTET_STRING_set(&pctx->ktmp, key, len))
138.               return 0;
139.           Poly1305_Init(&pctx->ctx, ASN1_STRING_get0_data(&pctx->ktmp));
                                         ^
140.           break;
141.   

crypto/asn1/asn1_lib.c:374:1: Parameter `*x->data`
  372.   }
  373.   
  374. > const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x)
  375.   {
  376.       return x->data;

crypto/asn1/asn1_lib.c:376:5: Assignment
  374.   const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x)
  375.   {
  376.       return x->data;
             ^
  377.   }
  378.   

crypto/poly1305/poly1305_pmeth.c:139:9: Call
137.               !ASN1_OCTET_STRING_set(&pctx->ktmp, key, len))
138.               return 0;
139.           Poly1305_Init(&pctx->ctx, ASN1_STRING_get0_data(&pctx->ktmp));
               ^
140.           break;
141.   

crypto/poly1305/poly1305.c:436:1: Parameter `*key`
  434.   #endif
  435.   
  436. > void Poly1305_Init(POLY1305 *ctx, const unsigned char key[32])
  437.   {
  438.       ctx->nonce[0] = U8TOU32(&key[16]);

crypto/poly1305/poly1305.c:441:21: Call
  439.       ctx->nonce[1] = U8TOU32(&key[20]);
  440.       ctx->nonce[2] = U8TOU32(&key[24]);
  441.       ctx->nonce[3] = U8TOU32(&key[28]);
                             ^
  442.   
  443.   #ifndef POLY1305_ASM

crypto/poly1305/poly1305.c:23:1: <Length trace>
21.   
22.   /* pick 32-bit unsigned integer in little endian order */
23. > static unsigned int U8TOU32(const unsigned char *p)
24.   {
25.       return (((unsigned int)(p[0] & 0xff)) |

crypto/poly1305/poly1305.c:23:1: Parameter `*p`
    21.   
    22.   /* pick 32-bit unsigned integer in little endian order */
    23. > static unsigned int U8TOU32(const unsigned char *p)
    24.   {
    25.       return (((unsigned int)(p[0] & 0xff)) |

crypto/poly1305/poly1305.c:28:29: Array access: Offset: 31 (⇐ 28 + 3) Size: [0, +oo] by call to `Poly1305_Init` 
    26.               ((unsigned int)(p[1] & 0xff) << 8) |
    27.               ((unsigned int)(p[2] & 0xff) << 16) |
    28.               ((unsigned int)(p[3] & 0xff) << 24));
                                      ^
    29.   }
    30.   

static unsigned int U8TOU32(const unsigned char *p)
{
    return (((unsigned int)(p[0] & 0xff)) |
            ((unsigned int)(p[1] & 0xff) << 8) |
            ((unsigned int)(p[2] & 0xff) << 16) |
            ((unsigned int)(p[3] & 0xff) << 24));
}
['static int pkey_poly1305_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)\n{\n    POLY1305_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_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_poly1305(EVP_PKEY_CTX_get0_pkey(ctx), &len);\n        }\n        if (key == NULL || len != POLY1305_KEY_SIZE ||\n            !ASN1_OCTET_STRING_set(&pctx->ktmp, key, len))\n            return 0;\n        Poly1305_Init(&pctx->ctx, ASN1_STRING_get0_data(&pctx->ktmp));\n        break;\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}', 'void Poly1305_Init(POLY1305 *ctx, const unsigned char key[32])\n{\n    ctx->nonce[0] = U8TOU32(&key[16]);\n    ctx->nonce[1] = U8TOU32(&key[20]);\n    ctx->nonce[2] = U8TOU32(&key[24]);\n    ctx->nonce[3] = U8TOU32(&key[28]);\n#ifndef POLY1305_ASM\n    poly1305_init(ctx->opaque, key);\n#else\n    if (!poly1305_init(ctx->opaque, key, &ctx->func)) {\n        ctx->func.blocks = poly1305_blocks;\n        ctx->func.emit = poly1305_emit;\n    }\n#endif\n    ctx->num = 0;\n}', 'static unsigned int U8TOU32(const unsigned char *p)\n{\n    return (((unsigned int)(p[0] & 0xff)) |\n            ((unsigned int)(p[1] & 0xff) << 8) |\n            ((unsigned int)(p[2] & 0xff) << 16) |\n            ((unsigned int)(p[3] & 0xff) << 24));\n}']