1. A computer-implemented method for protecting software, comprising: inserting constraint code into a computer program to be protected at a patch point which is between instructions of the computer program; and executing the constraint code when a control flow of the computer program reaches the patch point.