Bump github.com/fxamacker/cbor/v2 to v2.7.0.

This commit is contained in:
Ben Luddy
2024-06-24 09:49:40 -04:00
parent a95f636e92
commit dbe4c093d9
60 changed files with 110 additions and 92 deletions

View File

@@ -1444,7 +1444,7 @@ func encodeStruct(e *bytes.Buffer, em *encMode, v reflect.Value) (err error) {
flds := structType.getFields(em)
start := 0
if em.sort == SortFastShuffle {
if em.sort == SortFastShuffle && len(flds) > 0 {
start = rand.Intn(len(flds)) //nolint:gosec // Don't need a CSPRNG for deck cutting.
}