In some places the parser seems to be guarding against dereferencing
`End`, while in others it relies on the presence of a trailing `'\0'` to
elide extra checks.
Add the remaining guards needed to ensure the parser never attempts to
dereference `End`, making it safe to not require a null-terminated input