News for hackers. Stuff that matters.
Re:I love coding in C by UncleMeat on Thursday December 26, 2019 @09:53PM (#21888768)
You'd be an extreme exception, then.

The truth is that decades of projects written in C have clearly demonstrated that people can't write secure programs in C.

Re:I love coding in C by jacquesm on Thursday December 26, 2019 @10:23PM (#21888902)
People can't write secure programs in any language. But C programs have ways of being insecure that other programs don't.
Re:I love coding in C by weberc2 on Friday December 27, 2019 @01:15AM (#21889573)
Virtually no one can write secure C code. This is different than “other languages allow some people to write insecure code occasionally”.
Re:I love coding in C by jacquesm on Friday December 27, 2019 @07:51AM (#21891036)
You're missing the point: writing secure code is categorically impossible, no matter what the language. That's very much different from 'other languages allow some people to write insecure code occasionally'. Every piece of code, every system ever built and every piece of hardware ever designed had bugs in it and if that item was supposed to be secure over time it will turn out that it wasn't. So the best you can hope for is that an item is obsoleted before you (or an adversary) detects its flaws and you're going to be fighting a rearguard action.

The whole idea that many eyes or 'safe' languages or some other magic bullet are going to solve this is so far off-base that it makes productive discussion impossible because everybody starts to focus on the particular tool at hand whereas the real problem is an instance of of the class 'architecture', not of the class 'tool'.

Re:I love coding in C by weberc2 on Friday December 27, 2019 @09:04AM (#21891354)
I don’t think I’m the one missing the point. You seem to be rebutting points I didn’t make, like other languages (or magic bullets) afford a bug count of zero. You also seem to be ignoring my point, which is that C is in a different ballpark than other languages in its difficulty of implementing correct software.
Re:I love coding in C by tekknik on Friday December 27, 2019 @11:00AM (#21892007)
you did say that other languages are more secure, and the parent post here is asserting the entire platform is insecure therefor no languages are secure, which is true.

however i disagree with both of you that writing safe C is hard. most of the problems i see relate to incorrect pointer usage or memory management. use stack allocated containers from libs very well tested and pass references. this removes entire classes of bugs from popping up. one thing you can’t do with C is be lazy.

Re:I love coding in C by UncleMeat on Friday December 27, 2019 @02:45PM (#21893897)
I absolutely guarantee that if you throw AFL at any modestly complex C program that you have written that it will find bugs. Guarantee. This isn't about laziness.
Re:I love coding in C by tekknik on Monday December 30, 2019 @09:55AM (#21913675)
safe and bug free are different things. nobody writes big free code but writing safe code isn’t as hard. also i’m not entirely sure how a program proves lack of laziness, if anything it proves laziness