crypto/ocsp/ocsp_prn.c:99: error: INTEGER_OVERFLOW_L2
  ([-9223372036854775808, 9223372036854775807] + 1):signed64.
Showing all 5 steps of the trace


crypto/ocsp/ocsp_prn.c:98:9: <LHS trace>
96.       if (BIO_write(bp, "OCSP Request Data:\n", 19) <= 0)
97.           goto err;
98.       l = ASN1_INTEGER_get(inf->version);
               ^
99.       if (BIO_printf(bp, "    Version: %lu (0x%lx)", l + 1, l) <= 0)
100.           goto err;

crypto/ocsp/ocsp_prn.c:98:9: Call
96.       if (BIO_write(bp, "OCSP Request Data:\n", 19) <= 0)
97.           goto err;
98.       l = ASN1_INTEGER_get(inf->version);
               ^
99.       if (BIO_printf(bp, "    Version: %lu (0x%lx)", l + 1, l) <= 0)
100.           goto err;

crypto/asn1/a_int.c:564:9: Assignment
  562.       int64_t r;
  563.       if (a == NULL)
  564.           return 0;
                 ^
  565.       i = ASN1_INTEGER_get_int64(&r, a);
  566.       if (i == 0)

crypto/ocsp/ocsp_prn.c:98:5: Assignment
96.       if (BIO_write(bp, "OCSP Request Data:\n", 19) <= 0)
97.           goto err;
98.       l = ASN1_INTEGER_get(inf->version);
           ^
99.       if (BIO_printf(bp, "    Version: %lu (0x%lx)", l + 1, l) <= 0)
100.           goto err;

crypto/ocsp/ocsp_prn.c:99:9: Binary operation: ([-9223372036854775808, 9223372036854775807] + 1):signed64
97.           goto err;
98.       l = ASN1_INTEGER_get(inf->version);
99.       if (BIO_printf(bp, "    Version: %lu (0x%lx)", l + 1, l) <= 0)
               ^
100.           goto err;
101.       if (inf->requestorName != NULL) {

int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *o, unsigned long flags)
{
    int i;
    long l;
    OCSP_CERTID *cid = NULL;
    OCSP_ONEREQ *one = NULL;
    OCSP_REQINFO *inf = &o->tbsRequest;
    OCSP_SIGNATURE *sig = o->optionalSignature;
    if (BIO_write(bp, "OCSP Request Data:\n", 19) <= 0)
        goto err;
    l = ASN1_INTEGER_get(inf->version);
    if (BIO_printf(bp, "    Version: %lu (0x%lx)", l + 1, l) <= 0)
        goto err;
    if (inf->requestorName != NULL) {
        if (BIO_write(bp, "\n    Requestor Name: ", 21) <= 0)
            goto err;
        GENERAL_NAME_print(bp, inf->requestorName);
    }
    if (BIO_write(bp, "\n    Requestor List:\n", 21) <= 0)
        goto err;
    for (i = 0; i < sk_OCSP_ONEREQ_num(inf->requestList); i++) {
        one = sk_OCSP_ONEREQ_value(inf->requestList, i);
        cid = one->reqCert;
        ocsp_certid_print(bp, cid, 8);
        if (!X509V3_extensions_print(bp,
                                     "Request Single Extensions",
                                     one->singleRequestExtensions, flags, 8))
            goto err;
    }
    if (!X509V3_extensions_print(bp, "Request Extensions",
                                 inf->requestExtensions, flags, 4))
        goto err;
    if (sig) {
        X509_signature_print(bp, &sig->signatureAlgorithm, sig->signature);
        for (i = 0; i < sk_X509_num(sig->certs); i++) {
            X509_print(bp, sk_X509_value(sig->certs, i));
            PEM_write_bio_X509(bp, sk_X509_value(sig->certs, i));
        }
    }
    return 1;
 err:
    return 0;
}
['int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *o, unsigned long flags)\n{\n    int i;\n    long l;\n    OCSP_CERTID *cid = NULL;\n    OCSP_ONEREQ *one = NULL;\n    OCSP_REQINFO *inf = &o->tbsRequest;\n    OCSP_SIGNATURE *sig = o->optionalSignature;\n    if (BIO_write(bp, "OCSP Request Data:\\n", 19) <= 0)\n        goto err;\n    l = ASN1_INTEGER_get(inf->version);\n    if (BIO_printf(bp, "    Version: %lu (0x%lx)", l + 1, l) <= 0)\n        goto err;\n    if (inf->requestorName != NULL) {\n        if (BIO_write(bp, "\\n    Requestor Name: ", 21) <= 0)\n            goto err;\n        GENERAL_NAME_print(bp, inf->requestorName);\n    }\n    if (BIO_write(bp, "\\n    Requestor List:\\n", 21) <= 0)\n        goto err;\n    for (i = 0; i < sk_OCSP_ONEREQ_num(inf->requestList); i++) {\n        one = sk_OCSP_ONEREQ_value(inf->requestList, i);\n        cid = one->reqCert;\n        ocsp_certid_print(bp, cid, 8);\n        if (!X509V3_extensions_print(bp,\n                                     "Request Single Extensions",\n                                     one->singleRequestExtensions, flags, 8))\n            goto err;\n    }\n    if (!X509V3_extensions_print(bp, "Request Extensions",\n                                 inf->requestExtensions, flags, 4))\n        goto err;\n    if (sig) {\n        X509_signature_print(bp, &sig->signatureAlgorithm, sig->signature);\n        for (i = 0; i < sk_X509_num(sig->certs); i++) {\n            X509_print(bp, sk_X509_value(sig->certs, i));\n            PEM_write_bio_X509(bp, sk_X509_value(sig->certs, i));\n        }\n    }\n    return 1;\n err:\n    return 0;\n}', 'long ASN1_INTEGER_get(const ASN1_INTEGER *a)\n{\n    int i;\n    int64_t r;\n    if (a == NULL)\n        return 0;\n    i = ASN1_INTEGER_get_int64(&r, a);\n    if (i == 0)\n        return -1;\n    if (r > LONG_MAX || r < LONG_MIN)\n        return -1;\n    return (long)r;\n}']