core: add missing \0 at the end of stderr buffer in hook_process