Throw exception when extractPacket result size is larger than buffer