Return -1/EINVAL when the buffer is too small.