Re:Git Security Vulnerabilities Announced
by shiftingleft on Tuesday January 17, 2023 @03:03PM
(#34418016)
To elaborate on this: Rust always performs bounds checks on array accesses, so you can't get an out-of-bound read/write.
[ Parent
| on HN ]
Re:Git Security Vulnerabilities Announced
by AlexAndScripts on Tuesday January 17, 2023 @05:41PM
(#34420546)
Is there a way to turn this off?
Re:Git Security Vulnerabilities Announced
by kibwen on Tuesday January 17, 2023 @06:12PM
(#34420866)
Not via a compiler flag, no. The way to "opt out" of bounds checks is to replace `foo[bar]` with `unsafe { foo.get_unchecked(bar) }` at a given callsite. And the use of `unsafe` is going to immediately raise the eyebrow of any code reviewer or auditor.