Handle segfaults caused by jumping into garbage, and add a test.
Merge pull request #246 from cgjones/handle-bad-ip

Handle segfaults caused by jumping into garbage, and add a test.