You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -67,9 +60,8 @@ func (s *slab) put(buf []byte) {
67
60
panic("slab is not initialized")
68
61
}
69
62
70
-
ptr:=unsafe.Pointer(unsafe.SliceData(buf)) //#nosec G103 -- Simple arena allocator implementation, does not appear to allow for any unsafe operations.
71
63
// Note that memory is NOT zero'd on return, but since all allocations are of defined widths and we only ever then read a record of exactly that width into the allocation, it will always be overwritten before use and can't leak.
72
-
s.buffer<-ptr
64
+
s.buffer<-buf
73
65
}
74
66
75
67
// MemPool is an Allocator implementation that uses a fixed size memory pool
0 commit comments