Fix: Add missing memset() calls

This PR adds some missing memset() calls when allocating memory on the
stack, which is exaclty the bug which causes a segfault on the latest
develop.