equal() reads some garbage bytes from the shorter string when comparing. This is OK most of the time, but not when the string ends at a page boundary, and the next page is not readable.