Actually that was a big problem with the GDI+ library a few years ago. People have even written their own vulnerable DLL scanners for this sort of thing.
"Never write when you can call; never call when you can visit; never talk when you can whisper; and never whisper when you can wink." -- supposedly by Russell Long
Well... Their transport secretary gave some great quotes in about building a massive telephone/internet database:
"If they are going to use the internet to communicate with each other and we don't have the power to deal with that, then you are giving a licence to terrorists to kill people."
"The biggest civil liberty of all is not to be killed by a terrorist."