Results for “Rust”
Small, practical examples. Search by task or narrow things down below.
Convert known numeric text to an integer
C#: Convert a trusted literal to an integer before adding. Validate external input before converting it.
C#✓ Tested
Convert known numeric text to an integer
Java: Convert a trusted literal to an integer before adding. Validate external input before converting it.
Java✓ Tested
Convert known numeric text to an integer
JavaScript: Convert a trusted literal to an integer before adding. Validate external input before converting it.
JavaScript✓ Tested
Convert known numeric text to an integer
TypeScript: Convert a trusted literal to an integer before adding. Validate external input before converting it.
TypeScript✓ Tested
Convert known numeric text to an integer
C++: Convert a trusted literal to an integer before adding. Validate external input before converting it.
C++✓ Tested
Convert known numeric text to an integer
C: Convert a trusted literal to an integer before adding. Validate external input before converting it.
C✓ Tested
Extract a compressed tar archive
Extract a trusted gzip-compressed tar archive into a dedicated destination directory.
tar✓ Tested
Print text containing percent characters literally
Bash Scripts: Never use untrusted text as the printf format string.
Bash Scripts✓ Tested
Remove a leading directory while extracting
Linux Commands: Use strip-components only after inspecting a trusted archive layout.
Linux Commands✓ Tested
Verify a file against a checksum manifest
Linux Commands: Use sha256sum -c with a manifest obtained from a trusted source.
Linux Commands✓ Tested