Make sure the incoming buffer is big enough before slicing it