Testing
Some sorts of errors (buffer overflow, array-bounds overrun) can be fixed indpendently of the user interface. Some sorts of errors can be quickly-Bondoed*-over, but not truly fixed without investigation into the root cause of the problem, or problem-group, and thinking about it.
If you have the symptom that "holding down Windows+Alt+Umlaut on German keyboards bypasses MSGINA and auto-logs the user into the Windows box as local admin", you can Bondo it over by writing code which modifies MSGINA to filter any key-combo containing an Umlaut. Unless you have a warehouse-sized testing facility with every possible keyboard, "testing" is not likely to catch the fact that it isn't just Umlauts, but also Cedillias on French, Catalan and Portuguese keyboards, and Myakizhnak on Russian, Ukranian, and Bulgarian keyboards, and (etc. ...). Only thinking will bring the realization that the problem is a problem-group, and the root cause was that whomever originally wrote MSGINA presumed its input would be only 7-bit ASCII**, and the proper fix is to revise MSGINA to deal with all key-code combos, if it practically can be, or re-writing it if not.
Testing is not enough. Thinking and code review is required to boost code quality.
*"Bondo" is an automobile dent-repair paste which is used to fill in small dents, and then painted-over.
**This is a made-up problem with a made-up root cause.