News for hackers. Stuff that matters.
Re:A critique of "How to C in 2016" by XorNot on Friday January 15, 2016 @05:40AM (#10908409)
It's also more secure. We've just this week now had an SSH bug where random chunks of memory get dumped somewhere they shouldn't (not that I'm clear on if calloc would help in this case, but the issue remains).

Zeroing memory is just good habit - it's means you don't wind up accidentally leaking things when you make a mistake. And you should assume you will.

Re:A critique of "How to C in 2016" by JoachimSchipper on Friday January 15, 2016 @05:49AM (#10908440)
calloc is not relevant to that issue - it's an out-of-bounds read.

(Good ASLR does help, by turning such issues into crash bugs.)

Re:A critique of "How to C in 2016" by anon1385 on Friday January 15, 2016 @06:08AM (#10908500)
https://www.qualys.com/2016/01/14/cve-2016-0777-cve-2016-077...

>- "out_start == out_last" (lines 205-206): no data was ever written to out_buf (and both out_start and out_last are still equal to 0) because no data was ever sent to the server after roaming_reply() was called, but the client sends (leaks) the entire uninitialized out_buf to the server (line 214), as if out_buf_size bytes of data were available.

Re:A critique of "How to C in 2016" by TazeTSchnitzel on Friday January 15, 2016 @06:25AM (#10908555)
Heartbleed wasn't an out-of-bounds read.
Re:A critique of "How to C in 2016" by notalaser on Friday January 15, 2016 @07:18AM (#10908795)
If OpenSSL had used calloc() everywhere instead of malloc(), Heartbleed would have still happened.
Re:A critique of "How to C in 2016" by user9982 on Friday January 15, 2016 @06:51AM (#10908674)
This bug isn't heartbleed. Also Heartbleed was SSL, not SSH.
Re:A critique of "How to C in 2016" by TazeTSchnitzel on Friday January 15, 2016 @08:37AM (#10909181)
I'm aware.