Check array length when searching for the end of the string
Merge pull request #22 from maxmind/greg/fix-buffer-overrun

Check array length when searching for the end of the string