Patch: fix wrong use of memset