Similar to , the calculation of message size is incorrect when using Custom Payload because CBUtil.sizeOfBytes incorrectly considers the length of [bytes] to be 2 bytes instead of 4.
Should fix CBUtil.sizeOfBytes to return the correct value, and have other code that uses it call a new method CBUtil.sizeOfShortBytes where applicable.