Fix memset call in stack.c