Browse Source

Avoid void ptr arithmetic in duk_alloc_pool.c

pull/2406/head
Sami Vaarala 4 years ago
parent
commit
360973e25b
  1. 2
      extras/alloc-pool/duk_alloc_pool.c
  2. 1
      releases/releases.yaml

2
extras/alloc-pool/duk_alloc_pool.c

@ -302,7 +302,7 @@ void duk_alloc_pool_get_pool_stats(duk_pool_state *s, duk_pool_stats *res) {
} else {
waste_bytes += duk__alloc_pool_get_waste_estimate(curr, s->size);
}
curr = curr + s->size;
curr = (void *) ((duk_uint8_t *) curr + s->size);
}
used_count = (size_t) (s->count - free_count);

1
releases/releases.yaml

@ -1379,3 +1379,4 @@ duktape_releases:
- "Improve DUK_USE_OS_STRING for macOS, iOS, watchOS, and tvOS (GH-2288)"
- "Fix JSON.stringify() handling of Array 'replacer' duplicates (e.g. JSON.stringify({foo: 123}, [\"foo\", \"foo\"])); previously incorrectly serialized multiple times, now only once (GH-2379)"
- "Use yaml.safe_load() instead of yaml.load() in Py2 tooling (GH-2384)"
- "Fix void pointer arithmetic in duk_alloc_pool.c, caused problems with MSVC (GH-2404, GH-2406)"

Loading…
Cancel
Save