crypto/property/property.c:409: error: BUFFER_OVERRUN_L2
  Offset: [0, -1+max(504, `state->store->nbits`)] Size: 63.
Showing all 6 steps of the trace


crypto/property/property.c:398:1: <Offset trace>
396.    * approach that imposes a performance impact.
397.    */
398. > static void impl_cache_flush_cache(QUERY *c, IMPL_CACHE_FLUSH *state)
399.   {
400.       OSSL_METHOD_STORE *store = state->store;

crypto/property/property.c:398:1: Parameter `state->store->nbits`
396.    * approach that imposes a performance impact.
397.    */
398. > static void impl_cache_flush_cache(QUERY *c, IMPL_CACHE_FLUSH *state)
399.   {
400.       OSSL_METHOD_STORE *store = state->store;

crypto/property/property.c:408:5: Assignment
406.           store->nbits = sizeof(store->rand_bits) * 8;
407.       }
408.       n = --store->nbits;
           ^
409.       if ((store->rand_bits[n >> 3] & (1 << (n & 7))) != 0)
410.           OPENSSL_free(lh_QUERY_delete(state->cache, c));

crypto/property/property.c:398:1: <Length trace>
396.    * approach that imposes a performance impact.
397.    */
398. > static void impl_cache_flush_cache(QUERY *c, IMPL_CACHE_FLUSH *state)
399.   {
400.       OSSL_METHOD_STORE *store = state->store;

crypto/property/property.c:398:1: Parameter `state->store->rand_bits[*]`
396.    * approach that imposes a performance impact.
397.    */
398. > static void impl_cache_flush_cache(QUERY *c, IMPL_CACHE_FLUSH *state)
399.   {
400.       OSSL_METHOD_STORE *store = state->store;

crypto/property/property.c:409:10: Array access: Offset: [0, -1+max(504, state->store->nbits)] Size: 63
407.       }
408.       n = --store->nbits;
409.       if ((store->rand_bits[n >> 3] & (1 << (n & 7))) != 0)
                ^
410.           OPENSSL_free(lh_QUERY_delete(state->cache, c));
411.       else

static void impl_cache_flush_cache(QUERY *c, IMPL_CACHE_FLUSH *state)
{
    OSSL_METHOD_STORE *store = state->store;
    unsigned int n;
    if (store->nbits == 0) {
        if (!RAND_bytes(store->rand_bits, sizeof(store->rand_bits)))
            return;
        store->nbits = sizeof(store->rand_bits) * 8;
    }
    n = --store->nbits;
    if ((store->rand_bits[n >> 3] & (1 << (n & 7))) != 0)
        OPENSSL_free(lh_QUERY_delete(state->cache, c));
    else
        state->nelem++;
}
['static void impl_cache_flush_cache(QUERY *c, IMPL_CACHE_FLUSH *state)\n{\n    OSSL_METHOD_STORE *store = state->store;\n    unsigned int n;\n    if (store->nbits == 0) {\n        if (!RAND_bytes(store->rand_bits, sizeof(store->rand_bits)))\n            return;\n        store->nbits = sizeof(store->rand_bits) * 8;\n    }\n    n = --store->nbits;\n    if ((store->rand_bits[n >> 3] & (1 << (n & 7))) != 0)\n        OPENSSL_free(lh_QUERY_delete(state->cache, c));\n    else\n        state->nelem++;\n}']