News for hackers. Stuff that matters.
Re:Memory Safety for Web Fonts by dpe82 on Wednesday March 19, 2025 @01:03PM (#43414568)
C and modern C++ are so different that lumping them together in a blanket assertion doesn't really carry much meaning.
Re:Memory Safety for Web Fonts by harrison_clarke on Wednesday March 19, 2025 @01:55PM (#43415267)
i think part of it is that if you have one in your project, it's nearly frictionless to have both. the toolchain is the same, and especially if you're using C++, you can and often do have C dependencies
Re:Memory Safety for Web Fonts by pjmlp on Wednesday March 19, 2025 @02:32PM (#43415678)
If only didn't exist so many folks that insist in using C types, and C headers, in modern C++ code.
Re:Memory Safety for Web Fonts by dpe82 on Wednesday March 19, 2025 @06:24PM (#43417881)
Indeed.
Re:Memory Safety for Web Fonts by steveklabnik on Wednesday March 19, 2025 @01:05PM (#43414599)
It is true that they are different, but also, given the significant overlap between the two, people will reasonably talk about them together.
Re:Memory Safety for Web Fonts by Wumpnot on Wednesday March 19, 2025 @05:34PM (#43417551)
From a safety perspective they aren't very close, there is a reason that all these CVE bugs are C code.
Re:Memory Safety for Web Fonts by steveklabnik on Wednesday March 19, 2025 @06:16PM (#43417830)
I haven't seen conclusive evidence that this is the case, do you happen to have an analysis of this somewhere?

Of course, C++ offers you tools that C doesn't, but some of those tools have their own sharp edges as well. Plus, many C++ codebases are "C with classes" style or similar hybrids, those are still ultimately C++ programs, not C ones.

Re:Memory Safety for Web Fonts by GoblinSlayer on Thursday March 20, 2025 @04:53AM (#43420999)
Counterexamples would be s2n, grpc, putty, postfix, that are either C with classes or non-PDP C. I suppose in postfix security design was an afterthought and added gradually, but at least it was thought.
Re:Memory Safety for Web Fonts by steveklabnik on Friday March 21, 2025 @12:43PM (#43437886)
I think this means you're making the opposite argument that most C++ folks do, which is that C with classes is bad, and more prone to security issues than "modern C++" is.
Re:Memory Safety for Web Fonts by GoblinSlayer on Saturday March 22, 2025 @11:24AM (#43446403)
My argument is that C with classes is bad when it uses bad security practice, not because it must be bad.
Re:Memory Safety for Web Fonts by pjmlp on Wednesday March 19, 2025 @08:39PM (#43418800)
If the code compiles with a C++ compiler, for better or worse it is C++ as well, might be C style C++ code, which is nonetheless part of the grammar, semantics and libraries defined by ISO C++ standard.

And that is the deal, lack of security culture.