Most of the time attackers exploit coding errors in applications to get access to systems and data but every so often we get a chance to exploit their lack of testing and resulting coding errors to affect their malicious code. In this case a simple error in a piece of malware gives us an opportunity.

https://blog.alertlogic.com/halting-the-lockergoga-ransomware/