3 ms·
> Uninitialized values and out-of-bounds memory accesses are significantly more important and worrisome than memory leaks (because they represent potential atta
by billforsternz 9y ago
> Uninitialized values and out-of-bounds memory accesses are significantly more important and worrisome than memory leaks (because they represent potential attack vectors)
I agree with your conclusion but not your reasoning. Attack vectors are way down the list of reasons why uninitialised values and out of bounds memory accesses are higher priority. They're higher priority because they will likely (maybe definitely) crash your program or (even worse) cause it to fail in a frustratingly indeterminate manner. You should be so lucky that your program becomes significant enough to be targetted by "attackers".
- yeukhon 9y agoAgree. One such simple example is a ListNode (Linked List). In C/C++ implementation, if we don’t explicitly declare node.next = null It can have a garage unless you assigned a value. This can be hard to debug in production.