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>
Tue, 30 May 2017 16:39:26 +0000 (12:39 -0400)
commit9d02a17a3c5926d49fde4e9ee3b2208152be8ef1
treec5e6fb5a3cefcfb82c364eddebf37bafa295da4f
parent929acf432c97533a3e447ad2659d27dab74ae63f
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.025382 seconds and 4 git commands to generate.