* Posts by Eric

1 publicly visible post • joined 16 May 2009

Unsafe at any speed: Memcpy() banished in Redmond

Eric
Alert

Back to the dark ages....

This is nothing other than the "Shoot the messenger for providing bad news..." concept from feudal times moved into the current day.

The problem has nothing to do with the memcpy() routine. memcpy()'s only fault is not safely dealing with overlapping buffers (and IMO should always be replaced with memmove()). The problem is that developers have become complacent by using higher level languages which protect them from themselves.

That's why there is a concept of "Adult Programming" at a lot of companies. Adult Programming is for people who understand the languages and libraries, AND HOW TO USE THEM SAFELY!

Adding the extra parameter does nothing to ensure the values provided as parameters are correct. That has to be done by the programmer.

I was always taught (back in the olden days of computing, in the before time that was the 1980's) that you must verify/validate any parameters you pass into your functions and methods before you make your call. If Microsoft (and colleges, universities, et al...) would go back to this, then we could get beyond "Pointy-Haired Boss" decisions like this and develop programmers who truly understand what they are doing.