5 ms·
What do they use then?
by rictic 12y ago
What do they use then?
- userbinator 12y agoThe MINIX one looks OK, for example: https://github.com/jncraton/minix3/blob/master/commands/simple/strings.c https://github.com/jncraton/minix3/blob/master/commands/simp... It does attempt to parse a.out format, but any weird values in the header won't cause reading/writing beyond the end of a buffer.
- comex 12y agoHaving a trivial binary format is not particularly great, nor is supporting one binary format and not another. Yet when you get to the complexity of ELF parsing, while I'm sure it's possible to code defensively and end up with fewer bugs than something like libbfd, parser bugs in general are the bread and butter of C. Solution? In my opinion, either don't bother parsing any binary formats (who actually needs that functionality?), or use a safe language.