crypto/asn1/a_int.c:252: error: INTEGER_OVERFLOW_L1
  (0 - 9223372036854775808):unsigned64.
Showing all 4 steps of the trace


crypto/asn1/a_int.c:242:9: <RHS trace>
240.   {
241.       uint64_t r;
242.       if (asn1_get_uint64(&r, b, blen) == 0)
               ^
243.           return 0;
244.       if (neg) {

crypto/asn1/a_int.c:242:9: Call
240.   {
241.       uint64_t r;
242.       if (asn1_get_uint64(&r, b, blen) == 0)
               ^
243.           return 0;
244.       if (neg) {

crypto/asn1/a_int.c:196:1: Parameter `*pr`
  194.   
  195.   /* Convert big endian buffer into uint64_t, return 0 on error */
  196. > static int asn1_get_uint64(uint64_t *pr, const unsigned char *b, size_t blen)
  197.   {
  198.       size_t i;

crypto/asn1/a_int.c:252:13: Binary operation: (0 - 9223372036854775808):unsigned64
250.               /* This never happens if INT64_MAX == ABS_INT64_MIN, e.g.
251.                * on ones'-complement system. */
252.               *pr = (int64_t)(0 - r);
                   ^
253.           } else {
254.               ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_SMALL);

static int asn1_get_int64(int64_t *pr, const unsigned char *b, size_t blen,
                          int neg)
{
    uint64_t r;
    if (asn1_get_uint64(&r, b, blen) == 0)
        return 0;
    if (neg) {
        if (r <= INT64_MAX) {
            *pr = -(int64_t)r;
        } else if (r == ABS_INT64_MIN) {
            *pr = (int64_t)(0 - r);
        } else {
            ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_SMALL);
            return 0;
        }
    } else {
        if (r <= INT64_MAX) {
            *pr = (int64_t)r;
        } else {
            ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_LARGE);
            return 0;
        }
    }
    return 1;
}
['static int asn1_get_int64(int64_t *pr, const unsigned char *b, size_t blen,\n                          int neg)\n{\n    uint64_t r;\n    if (asn1_get_uint64(&r, b, blen) == 0)\n        return 0;\n    if (neg) {\n        if (r <= INT64_MAX) {\n            *pr = -(int64_t)r;\n        } else if (r == ABS_INT64_MIN) {\n            *pr = (int64_t)(0 - r);\n        } else {\n            ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_SMALL);\n            return 0;\n        }\n    } else {\n        if (r <= INT64_MAX) {\n            *pr = (int64_t)r;\n        } else {\n            ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_LARGE);\n            return 0;\n        }\n    }\n    return 1;\n}', 'static int asn1_get_uint64(uint64_t *pr, const unsigned char *b, size_t blen)\n{\n    size_t i;\n    uint64_t r;\n    if (blen > sizeof(*pr)) {\n        ASN1err(ASN1_F_ASN1_GET_UINT64, ASN1_R_TOO_LARGE);\n        return 0;\n    }\n    if (b == NULL)\n        return 0;\n    for (r = 0, i = 0; i < blen; i++) {\n        r <<= 8;\n        r |= b[i];\n    }\n    *pr = r;\n    return 1;\n}']