Closed peschkaj closed 3 years ago
In the NextId method, there is a chance that the code assigning to high could contain values of subsec_a that overflow and overwrite portions of unixts. Both unixts and subsec_a should be recoverable from within the UUID.
high
subsec_a
unixts
ulong high = (unixts << 28) | (subsec_a << 16) | (Version << 12) | (_counter & CounterMask);
The preferred option here would be to mask all values to the appropriate size before creating any high/low values.
Closed in ddd4a26b1c76c33f73bc2daf0bb4b17a94cee727
In the NextId method, there is a chance that the code assigning to
high
could contain values ofsubsec_a
that overflow and overwrite portions ofunixts
. Bothunixts
andsubsec_a
should be recoverable from within the UUID.The preferred option here would be to mask all values to the appropriate size before creating any high/low values.