aboutsummaryrefslogtreecommitdiffstats
path: root/src/stack.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-05-13 00:48:31 +0200
committerDavid Robillard <d@drobilla.net>2018-05-27 21:10:21 +0200
commit52d0ac81eee3462c6839c7374ffe57329f7702b7 (patch)
treee40ed9149fb64122f8e4bc349639762baed11c3f /src/stack.h
parent48a9091b17435512f85d9ff202a5a7ea46c6af2a (diff)
downloadserd-52d0ac81eee3462c6839c7374ffe57329f7702b7.tar.gz
serd-52d0ac81eee3462c6839c7374ffe57329f7702b7.tar.bz2
serd-52d0ac81eee3462c6839c7374ffe57329f7702b7.zip
Zero node padding before passing to reader sinks
Diffstat (limited to 'src/stack.h')
-rw-r--r--src/stack.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stack.h b/src/stack.h
index 466a6027..11b31222 100644
--- a/src/stack.h
+++ b/src/stack.h
@@ -80,6 +80,7 @@ static inline void
serd_stack_pop_to(SerdStack* stack, size_t n_bytes)
{
assert(stack->size >= n_bytes);
+ memset(stack->buf + n_bytes, 0, stack->size - n_bytes);
stack->size = n_bytes;
}