Re:Brushing up on operating systems and C programming
by yeukhon on Sunday January 21, 2018 @06:24AM
(#16197665)
Agree. 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.
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".