buffer_grow uses realloc to extend the buffer, due to the fact that realloc doesn't guarantee that allocated memory is initialized there should be a memset. --- vhostmd/util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vhostmd/util.c b/vhostmd/util.c index 70fc804..804c483 100644 --- a/vhostmd/util.c +++ b/vhostmd/util.c @@ -53,6 +53,7 @@ static int buffer_grow(vu_buffer *buf, int len) return -1; buf->size = size; + memset(&buf->content[buf->use], 0, len); return 0; } -- 2.17.1 (Apple Git-112) _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list