Add underflow checks to string_sub() to prevent accessing wrong address space when start/end is outside of string's address space.