antrea-io / antrea

Kubernetes networking based on Open vSwitch
https://antrea.io
Apache License 2.0
1.65k stars 364 forks source link

Automated cherry pick of #6664: Replace unsafe.Slice with memory copying to avoid potential #6670

Open XinShuYang opened 2 weeks ago

XinShuYang commented 2 weeks ago

Cherry pick of #6664 on release-2.1.

6664: Replace unsafe.Slice with memory copying to avoid potential

For details on the cherry pick process, see the cherry pick requests page.

XinShuYang commented 1 week ago

/test-windows-all

antoninbas commented 1 week ago

@tnqn given that you found another issue with the code (unsafe.Pointer converted to uintptr and assigned to a variable, which violates rule 5 of https://pkg.go.dev/unsafe#Pointer), do you want to wait and backport both fixes (+ the unit test) at the same time?