diff --git a/src/util/pm_buffer.c b/src/util/pm_buffer.c index 1e79e46718c..5171c5bb3be 100644 --- a/src/util/pm_buffer.c +++ b/src/util/pm_buffer.c @@ -84,10 +84,8 @@ pm_buffer_append(pm_buffer_t *buffer, const void *source, size_t length) { */ void pm_buffer_append_zeroes(pm_buffer_t *buffer, size_t length) { - size_t cursor = buffer->length; - if (pm_buffer_append_length(buffer, length)) { - memset(buffer->value + cursor, 0, length); - } + size_t source = 0; + pm_buffer_append(buffer, (const void *) source, length); } /**