Packets are at the boundary of the system where, vast majority of the time, they are received from an untrusted source. Raw indexing into the data buffer can open attack vectors if the offsets are invalid. Validating offsets beforehand is verbose and error prone. The commit updates Packet::data() api to take a SliceIndex and always to return an Option. The call-sites are so forced to explicitly handle the case where the offsets are invalid. |
||
---|---|---|
.. | ||
benches | ||
bpf | ||
cargo-build-bpf | ||
cargo-test-bpf | ||
docker-solana | ||
gen-headers | ||
macro | ||
program | ||
src | ||
tests | ||
.gitignore | ||
Cargo.toml | ||
README.md | ||
build.rs | ||
package.json |
README.md
Solana SDK
Use the Solana SDK Crate to write client side applications in Rust. If writing on-chain programs, use the Solana Program Crate instead.
More information about Solana is available in the Solana documentation.
The Solana Program Library provides examples of how to use this crate.
Still have questions? Ask us on Discord