[PATCH] Fix buffer overflow and races in capi debug functions