Re:We found a division by zero bug in FFmpeg with a vibecode...
by Spivak on Thursday August 27, 2026 @04:27PM
(#49470744)
I mean I get the sentiment but Rust won't save you against division by zero, it'll just panic at runtime like every other language.
[ Parent
| on HN ]
Re:We found a division by zero bug in FFmpeg with a vibecode...
by Gigachad on Thursday August 27, 2026 @07:07PM
(#49472439)
From a security perspective, panic at runtime is not that bad for security. Much better than continuing to run with undefined behavior. If someone sends a malformed video in and it crashes the ffmpeg process you can just log it and restart it. Vs potentially exploiting the system.
Re:We found a division by zero bug in FFmpeg with a vibecode...
by Sharlin on Friday August 28, 2026 @05:21AM
(#49476266)
The Rust standard library has `NonZero<T>`, which, if used, at least forces you to consider what you initialize it with. Doing
let foo = NonZero::new(unvalidated_input).unwrap();
is at the very least a big red sign that stands out in the code and should fail code review.