2 ms·
'undefined' is never safe in Javascript. As for the rest of your comment - good job on completely missing the point. When we talk about "buffer overflows", pr
by otabdeveloper4 5y ago
'undefined' is never safe in Javascript.
As for the rest of your comment - good job on completely missing the point.
When we talk about "buffer overflows", privilige escalation exploits are the least of our problems.
https://hackernoon.com/null-the-billion-dollar-mistake-8t5z32d6 https://hackernoon.com/null-the-billion-dollar-mistake-8t5z3...
- pritambarhate 5y agoThe link you gave doesn't even mention buffer overflows. Do you have some material which explains the things you are trying to claim in more detail?
- paavohtl 5y agoOf course undefined is safe. It is just a different kind of null, and nothing else.
- otabdeveloper4 5y agoYou're redefining "safe" to mean "doesn't segfault". Telling your boss that the frontend is splattered with 'undefined' and all the balances are unsynchronized, but, hey, it's not a bug because no segfaults were involved in the process is a very good way to get fired.
- paavohtl 5y agoIf you are using TypeScript (which you should), undefined is not inherently any more dangerous or unpredictable than any other form of encoding missing values.
- otabdeveloper4 5y agoTypeScript is better than JavaScript, yes. But still it doesn't guarantee anything at runtime.
- kaba0 5y agoCan you modify a value in another part of your code through undefined?