Fix brace issue, move buffer to stack to avoid malloc arena and stack collision.