crypto/asn1/a_int.c:445: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: 8 by call to `asn1_put_uint64`.
Showing all 5 steps of the trace


crypto/asn1/a_int.c:440:1: Array declaration
438.   }
439.   
440. > static int asn1_string_set_uint64(ASN1_STRING *a, uint64_t r, int itype)
441.   {
442.       unsigned char tbuf[sizeof(r)];

crypto/asn1/a_int.c:445:9: Call
443.       size_t l;
444.       a->type = itype;
445.       l = asn1_put_uint64(tbuf, r);
               ^
446.       if (l == 0)
447.           return 0;

crypto/asn1/a_int.c:292:1: <Length trace>
290.   }
291.   
292. > static size_t asn1_put_uint64(unsigned char *b, uint64_t r)
293.   {
294.       if (r >= 0x100) {

crypto/asn1/a_int.c:292:1: Parameter `*b`
  290.   }
  291.   
  292. > static size_t asn1_put_uint64(unsigned char *b, uint64_t r)
  293.   {
  294.       if (r >= 0x100) {

crypto/asn1/a_int.c:309:13: Array access: Offset: [-1, +oo] Size: 8 by call to `asn1_put_uint64` 
  307.   
  308.           do {
  309.               *p-- = r & 0xFF;
                     ^
  310.               r >>= 8;
  311.           } while (p >= b);

static size_t asn1_put_uint64(unsigned char *b, uint64_t r)
{
    if (r >= 0x100) {
        unsigned char *p;
        uint64_t rtmp = r;
        size_t i = 0;
        while (rtmp) {
            rtmp >>= 8;
            i++;
        }
        p = b + i - 1;
        do {
            *p-- = r & 0xFF;
            r >>= 8;
        } while (p >= b);
        return i;
    }
    b[0] = (unsigned char)r;
    return 1;
}
['static int asn1_string_set_uint64(ASN1_STRING *a, uint64_t r, int itype)\n{\n    unsigned char tbuf[sizeof(r)];\n    size_t l;\n    a->type = itype;\n    l = asn1_put_uint64(tbuf, r);\n    if (l == 0)\n        return 0;\n    return ASN1_STRING_set(a, tbuf, l);\n}', 'static size_t asn1_put_uint64(unsigned char *b, uint64_t r)\n{\n    if (r >= 0x100) {\n        unsigned char *p;\n        uint64_t rtmp = r;\n        size_t i = 0;\n        while (rtmp) {\n            rtmp >>= 8;\n            i++;\n        }\n        p = b + i - 1;\n        do {\n            *p-- = r & 0xFF;\n            r >>= 8;\n        } while (p >= b);\n        return i;\n    }\n    b[0] = (unsigned char)r;\n    return 1;\n}']