
< 	for (p = s;  p < s + slen;  p++)
---
> 	for (size_t i = 0; i < slen; i++) {
> 		p = s + i;
