kauth: Fix overflow when writing ticket file