News for hackers. Stuff that matters.
Re:Moving the Linux Kernel to Modern C by toast0 on Thursday February 24, 2022 @05:37PM (#30461301)
> Same as the infamous PHP mysql_real_escape_string (don't make the mistake of using mysql_escape_string!) [2][3] or whole host of C stdlib footguns like strcpy/strncpy

In all of those, the enhanced function takes more paramaters. Switching the existing name to require a new parameter will break existing code, and people will not want to update. Making the new parameter optional is possible, but IMHO is messier than a new function that has required parameters and then deprecating the old function (and eventually removing it).

There are no comments on this comment yet.