3 ms·
Codecs are actually a wonderful test-case for Rust: they're a frequent source of vulnerabilities because they have to deal with arbitrary input, they usually ha
by AceJohnny2 9y ago
Codecs are actually a wonderful test-case for Rust: they're a frequent source of vulnerabilities because they have to deal with arbitrary input, they usually have to perform fiddly sub-byte and/or array manipulation, and their pressure for maximum performance mean they have to make as efficient use of the hardware and memory as possible (and any mistake lead back to the first point)
So even if you don't agree with some of the author's points, his use-case is a good test for the suitability of Rust as a Systems Programming Language.
- Gankro 9y agoYes, let us never forget how many exploits there are in trivial codecs like ICO and BMP, because they're written in C(++): https://bugzilla.mozilla.org/show_bug.cgi?id=775794#c0 https://bugzilla.mozilla.org/show_bug.cgi?id=775794#c0
- nnethercote 9y agoBMP isn't so trivial, largely because it's been extended multiple times while never having a proper spec. http://searchfox.org/mozilla-central/rev/bbc1c59e460a27b20929b56489e2e55438de81fa/image/decoders/nsBMPDecoder.cpp#10-83 http://searchfox.org/mozilla-central/rev/bbc1c59e460a27b2092... has some of the gory details.
- tinus_hn 9y agoAnd .ico is just .bmp with some extras.