logoalt Hacker News

pjmlp11/04/20251 replyview on HN

Thankfully the security holes in C that have allowed Morris worm to exist, have been taken care by WG14 since then.


Replies

AgentME11/04/2025

The future isn't evenly distributed. I recently discovered an actively developed software project that had a ton of helper functions based on the design of `gets` with the same vulnerability. Surprisingly not all C/C++ developers have learned yet to recoil in horror at seeing a buffer pointer being passed around without a length. (C++'s std::span was very convenient for fixing the issue by letting the buffer pointer and length be kept together, exactly like Go and Rust slices.)

show 1 reply