1 result · Feed
-
Medium —
Unsound usages of `u8` type casting in spl-token-swap
The library provides a safe public API `unpack` to cast `u8` array to arbitrary types, which can cause to undefined behaviors. The length check of array can only prevent out-of-bound access on the return type. However, it can't prevent misaligned pointer when…