privat/nit — pull request #854 by privat (2014-10-29 01:38:08+00:00)
Title: lib: fix semantic on has_substring on extreme cases

And avoid illegal access outside the string.

Detected thanks to the interpreted that detect out-of bound accesses in nativestrings.