prysmaticlabs / prysm

append possibly assigns to a wrong variable CRT-D0001
Bug risk
Minor
9 days ago3 years old
append result not assigned to the same slice
 959
 960		// Add some more new validator to the base validator.
 961		validatosToAddInTest := validators(10000)
 962		allValidators := append(initialSetOfValidators, validatosToAddInTest...) 963
 964		// shuffle validators.
 965		rand.Seed(time.Now().UnixNano())
append result not assigned to the same slice
 913
 914		// Add some more new validator to the base validator.
 915		validatosToAddInTest := validators(10000)
 916		allValidators := append(initialSetOfValidators, validatosToAddInTest...) 917
 918		// shuffle validators.
 919		rand.Seed(time.Now().UnixNano())
append result not assigned to the same slice
 80	message := signed.Message
 81	newCredentials := make([]byte, executionToBLSPadding)
 82	newCredentials[0] = params.BeaconConfig().ETH1AddressWithdrawalPrefixByte
 83	val.WithdrawalCredentials = append(newCredentials, message.ToExecutionAddress...) 84	err = st.UpdateValidatorAtIndex(message.ValidatorIndex, val)
 85	return st, err
 86}
append result not assigned to the same slice
161		b.sharedFieldReferences[types.HistoricalSummaries] = stateutil.NewRef(1)
162	}
163
164	b.historicalSummaries = append(summaries, summary)165	b.markFieldAsDirty(types.HistoricalSummaries)
166	return nil
167}
append result not assigned to the same slice
138		b.sharedFieldReferences[types.HistoricalRoots] = stateutil.NewRef(1)
139	}
140
141	b.historicalRoots = append(roots, root)142	b.markFieldAsDirty(types.HistoricalRoots)
143	return nil
144}