unsafeString performs an unsafe conversion from a []byte to a string. The returned string will share the underlying memory with the []byte which thus allows the string to be mutable through the []byte. We're careful to use this method only in situations in which the []byte will not be modified. A w
(b []byte)
| 1209 | // |
| 1210 | // A workaround for the absence of https://github.com/golang/go/issues/2632. |
| 1211 | func unsafeString(b []byte) string { |
| 1212 | /* #nosec G103 */ |
| 1213 | return *(*string)(unsafe.Pointer(&b)) |
| 1214 | } |