Fix overflow in encode/decode