As a general rule of thumb, if shooting to stop a threat to your safety or the safety of another is the only sure way of stopping said threat, there are very few jurisdictions in the United States that will hold you criminally liable for the shooting.
And as another general rule of thumb, it's a rather poor idea to ask "when can I shoot someone", IMHO. Back when there was still intellectual discussion on OCDO, this was a good thread on the topic:
http://opencarry.mywowbb.com/forum60/6469.html