crypto/asn1/a_int.c:372: error: INTEGER_OVERFLOW_L2
  ([0, 8] - 1):unsigned32.
Showing all 3 steps of the trace


crypto/asn1/a_int.c:365:10: <LHS trace>
363.           a->type = V_ASN1_INTEGER;
364.   
365.       for (i = 0; i < sizeof(long); i++) {
                ^
366.           if (v == 0)
367.               break;

crypto/asn1/a_int.c:365:10: Assignment
363.           a->type = V_ASN1_INTEGER;
364.   
365.       for (i = 0; i < sizeof(long); i++) {
                ^
366.           if (v == 0)
367.               break;

crypto/asn1/a_int.c:372:10: Binary operation: ([0, 8] - 1):unsigned32
370.       }
371.       j = 0;
372.       for (k = i - 1; k >= 0; k--)
                ^
373.           a->data[j++] = buf[k];
374.       a->length = j;

int ASN1_INTEGER_set(ASN1_INTEGER *a, long v)
{
    int j, k;
    unsigned int i;
    unsigned char buf[sizeof(long) + 1];
    if (a->length < (int)(sizeof(long) + 1)) {
        if (a->data != NULL)
            OPENSSL_free(a->data);
        if ((a->data =
             (unsigned char *)OPENSSL_malloc(sizeof(long) + 1)) != NULL)
            memset((char *)a->data, 0, sizeof(long) + 1);
    }
    if (a->data == NULL) {
        ASN1err(ASN1_F_ASN1_INTEGER_SET, ERR_R_MALLOC_FAILURE);
        return (0);
    }
    if (v < 0) {
        v = -v;
        a->type = V_ASN1_NEG_INTEGER;
    } else
        a->type = V_ASN1_INTEGER;
    for (i = 0; i < sizeof(long); i++) {
        if (v == 0)
            break;
        buf[i] = (int)v & 0xff;
        v >>= 8;
    }
    j = 0;
    for (k = i - 1; k >= 0; k--)
        a->data[j++] = buf[k];
    a->length = j;
    return (1);
}
['int ASN1_INTEGER_set(ASN1_INTEGER *a, long v)\n{\n    int j, k;\n    unsigned int i;\n    unsigned char buf[sizeof(long) + 1];\n    if (a->length < (int)(sizeof(long) + 1)) {\n        if (a->data != NULL)\n            OPENSSL_free(a->data);\n        if ((a->data =\n             (unsigned char *)OPENSSL_malloc(sizeof(long) + 1)) != NULL)\n            memset((char *)a->data, 0, sizeof(long) + 1);\n    }\n    if (a->data == NULL) {\n        ASN1err(ASN1_F_ASN1_INTEGER_SET, ERR_R_MALLOC_FAILURE);\n        return (0);\n    }\n    if (v < 0) {\n        v = -v;\n        a->type = V_ASN1_NEG_INTEGER;\n    } else\n        a->type = V_ASN1_INTEGER;\n    for (i = 0; i < sizeof(long); i++) {\n        if (v == 0)\n            break;\n        buf[i] = (int)v & 0xff;\n        v >>= 8;\n    }\n    j = 0;\n    for (k = i - 1; k >= 0; k--)\n        a->data[j++] = buf[k];\n    a->length = j;\n    return (1);\n}']