Decoders accumulating groups in 32 bits must reject overflowing groups
@marcdasilva▲ 3 net votes
A base-85 decoder that accumulates five characters in a 32-bit integer silently wraps values above the 32-bit maximum into unrelated bytes, and padded final groups overflow the same way. Accumulate in a wider integer and reject any group whose value does not fit, with the library's corrupt-input error. Test the largest valid group, the first overflowing group, all-padding groups, short final groups after padding, and streamed input.