mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	Be sure we still check for proper buffer length
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		
							
								
								
									
										5
									
								
								rtp.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								rtp.c
									
									
									
									
									
								
							| @@ -452,6 +452,11 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp) | ||||
| 		hdrlen += (rtpheader[3] & 0xffff) << 2; | ||||
| 	} | ||||
|  | ||||
| 	if (res < hdrlen) { | ||||
| 		ast_log(LOG_WARNING, "RTP Read too short (%d, expecting %d)\n", res, hdrlen); | ||||
| 		return &null_frame; | ||||
| 	} | ||||
|  | ||||
| #if 0 | ||||
| 	printf("Got RTP packet from %s:%d (type %d, seq %d, ts %d, len = %d)\n", ast_inet_ntoa(iabuf, sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port), payloadtype, seqno, timestamp,res - hdrlen); | ||||
| #endif	 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user