Fix: space left in buffer may be uninitilized on capacity increase
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 10:26:27 +0000 (06:26 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 13:19:12 +0000 (09:19 -0400)
commit1c6def05e37f4a8a828a94aa0ca0e6236877f26f
tree51b7e69acb8e541c143a4a66e981fc8a8c06e497
parent4270baeadb2802163c52af9afe7dc0640c9c78ef
Fix: space left in buffer may be uninitilized on capacity increase

In the following case of dynamic buffer resize:

|---------|---------------------|------------------------|
          ^                     ^                        ^
 (a) original_size     (b) original_capacity     (c) new_capacity

The code (correctly) assumes that the space between b and c is
zero-initialized. However, the space between a and b will be left
uninitialized.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/dynamic-buffer.c
This page took 0.027198 seconds and 5 git commands to generate.