Files
tailscale/util/cmpver
Raphael Fakhri b0e35bf5b5 util/cmpver: don't panic on numbers that overflow a uint64
Compare parsed each numeric field with strconv.ParseUint and panicked
if that failed, so a version with a field of 20 or more digits, such as
a long build stamp, crashed the caller.

Compare digit runs by length after trimming leading zeros, then
lexically. This gives the same results as before for numbers that fit
in a uint64 and works for numbers of any length.

Fixes #21532

Signed-off-by: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com>
2026-09-30 21:41:37 -07:00
..