Won't this overwrite out-of-bounds memory if `strlen` returns 0?