It seems to me that buffer overflows are considered to be the most common and dangerous security flaws in programs today. But I don't understand how. Why don't developers just use find and replace function to replace all unsafe implementations of I/O with the safe ones?
Why don't big companies like Adobe and Microsoft just fix it once and for all and forever?
strncpy()are the exception, not the norm. For example,foo[num] = bar;– forest Apr 24 '18 at 03:48index < sizeof(a)/sizeof(a[0])? How come find and replace is useless? It's not like we're solving the halting problem, this kind of thing can be inferred from syntax. – Gillian Apr 24 '18 at 09:24