4 ms·
How in the hell does "accidentally" accessing the first element of an array (by "accidentally" passing 0 to an array in a language that has 0-based indexing) re
by lectrick 13y ago
How in the hell does "accidentally" accessing the first element of an array (by "accidentally" passing 0 to an array in a language that has 0-based indexing) result in "privilege escalation errors"? That's just "shitty programming".
For that matter, how does a 1-based indexing language NOT result in far more "off by one" errors which would include the kind of errors commonly known as "buffer overflow" errors?
- Dylan16807 13y agoIn most cases indexing doesn't affect safety, the privilege stuff was related to what eridius was talking about with physical addresses. I don't think either one creates more off-by-one errors in people used to it.