Fix swprintf buffer overflows