Software vulnerability is one of the important causes of computer security. Taking the CVE-2012-0158 as an example, the form prince and exploitation way of vulnerability is explored. Which codes and functions are called by the procedure when the vulnerability is triggered are briefly described through the dynamic analysis method and the causes and hazards of vulnerability are explained to arouse people's attention of taking safe development and avoiding vulnerability. Then safe development methods based on security are mentioned to reduce computer security problems caused by software vulnerabilities fundamentally, so as to improve the safety performance of the system and software.