if ((u_int8_t *)&(buf[0]) > snapend - this_len)
if (buf + this_len > snapend)
ike_pl_print (u_int8_t type, u_int8_t *buf, u_int8_t doi){	static const char *pltypes[] = IKE_PAYLOAD_TYPES_INITIALIZER;	static const char *plprivtypes[] = 	    IKE_PRIVATE_PAYLOAD_TYPES_INITIALIZER;	u_int8_t next_type = buf[0];	u_int16_t this_len = buf[2]<<8 | buf[3];	if (type < PAYLOAD_PRIVATE_MIN || type >= PAYLOAD_PRIVATE_MAX)		printf("\n\t%spayload: %s len: %hu", ike_tab_offset(),		    (type < (sizeof pltypes/sizeof pltypes[0]) ?			pltypes[type] : "<unknown>"), this_len);	else		printf("\n\t%spayload: %s len: %hu", ike_tab_offset(),		    plprivtypes[type - PAYLOAD_PRIVATE_MIN], this_len);	if ((type < PAYLOAD_RESERVED_MIN &&	    this_len < min_payload_lengths[type]) || this_len == 0)		goto pltrunc;	if ((type > PAYLOAD_PRIVATE_MIN && type < PAYLOAD_PRIVATE_MAX &&	    this_len < min_priv_payload_lengths[type - PAYLOAD_PRIVATE_MIN]) ||	    this_len == 0)		goto pltrunc;	    	if ((u_int8_t *)&(buf[0]) > snapend - this_len)		goto pltrunc;	ike_tab_level++;	switch (type) {	case PAYLOAD_NONE:		return;	case PAYLOAD_SA:		ike_pl_sa_print(buf, this_len);		break;	case PAYLOAD_PROPOSAL:		ike_pl_proposal_print(buf, this_len, doi);		break;	case PAYLOAD_TRANSFORM:		ike_pl_transform_print(buf, this_len, doi);		break;	case PAYLOAD_KE:		ike_pl_ke_print(buf, this_len, doi);		break;	case PAYLOAD_ID:		/* Should only happen with IPsec DOI */		ipsec_id_print(buf, this_len, doi);		break;	case PAYLOAD_CERT:	case PAYLOAD_CERTREQUEST:	case PAYLOAD_HASH:	case PAYLOAD_SIG:	case PAYLOAD_NONCE:		break;	case PAYLOAD_DELETE:		ike_pl_delete_print(buf, this_len);		break;	case PAYLOAD_NOTIFICATION:	  	ike_pl_notification_print(buf, this_len);		break;	case PAYLOAD_VENDOR:		ike_pl_vendor_print(buf, this_len, doi);		break;	case PAYLOAD_ATTRIBUTE:		ike_pl_attribute_print(buf, this_len);		break;	case PAYLOAD_SAK:	case PAYLOAD_SAT:	case PAYLOAD_KD:	case PAYLOAD_SEQ:	case PAYLOAD_POP:	case PAYLOAD_NAT_D:	case PAYLOAD_NAT_OA:	case PAYLOAD_NAT_D_DRAFT:	case PAYLOAD_NAT_OA_DRAFT:		break;	default:		break;	}	ike_tab_level--;	if (next_type)  /* Recurse over next payload */		ike_pl_print(next_type, buf + this_len, doi);	return;pltrunc:	if (doi == ISAKMP_DOI)		fputs(" [|isakmp]", stdout);	else		fputs(" [|ipsec]", stdout);}