Revision db8c431a

View differences:

ml.c
411 411
	msg_size -= msg_h->len_mon_data_hdr;
412 412
	con_msg = (struct conn_msg *)msgbuf;
413 413
	
414
	//verify message validity
415
	if (msg_size < sizeof(struct conn_msg)) {
416
		char recv_addr_str[INET_ADDRSTRLEN];
417
		inet_ntop(AF_INET, &(recv_addr->sin_addr.s_addr), recv_addr_str, INET_ADDRSTRLEN);
418
		info("Invalid conn_msg received from %s\n", recv_addr_str);
419
		return;
420
	}
421

  
414 422
	//decode sock_id for debug messages
415 423
	mlSocketIDToString(&con_msg->sock_id,sock_id_str,999);
416 424

  
......
1114 1122
	bufptr += MSG_HEADER_SIZE + msg_h->len_mon_packet_hdr;
1115 1123
	msg_size = recvSize - MSG_HEADER_SIZE - msg_h->len_mon_packet_hdr;
1116 1124

  
1125
	//verify more fields
1126
	if (msg_size < 0) {
1127
	  info("Corrupted UDP packet received");
1128
	  return;
1129
	}
1117 1130

  
1118 1131
	if(get_Recv_pkt_inf_cb != NULL) {
1119 1132
		mon_pkt_inf msginfNow;

Also available in: Unified diff