Add missing check for a too-large packet, so we don't blow up trying to allocate a huge buffer; fixes bug 6667.