memccpy would return a pointer over the given size when c is not found in the source buffer and n reaches 0.