Skip to content

1.1.4

@1amageek 1amageek tagged this 11 Jun 13:38
Data.removeFirst() shifts startIndex, so the strip loop's zero-based
subscripts trapped on the next iteration whenever the input had a
redundant leading zero followed by a byte with the high bit clear.
This caused a random crash (~0.4%) in libp2p QUIC certificate
generation, which feeds a random serial with the top bit cleared.
Operate on [UInt8] instead, which rebases indices on removal.

Add regression tests covering zero stripping, sign preservation, and
all-zero input.
Assets 2
Loading