TS-1475: Prevent bug where a pointer could be passed with 0 length