Hacker News new | ask | show | jobs
by badsectoracula 2618 days ago
If the callee is meant to corrupt it then it is your fault for misusing it (unless the corruption is intentional and you plan to recalculate the length after calling it). If it wasn't meant to corrupt it then it is a bug and if it is in your code then it is your fault for not using the string functionality that you already have in place to avoid the bug in the first place. If it is not in your code, as long as you had to use it you'd have that bug regardless of what language or framework you used since it is out of your control and there isn't anything you can do about it.
1 comments

Aka, C's community version of "you are holding it wrong".
Is there a language that doesn't allow any abuse of an API, including APIs that were not written in that language?
Yes, any system languages that doesn't need to depend on the existence of C.

If you are going to mention Assembly as possibility, check ClearPath where there is no Assembly, NEWP has full control over the hardware stack.