Be sure to do ntohl before considering extended field

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2004-08-31 14:03:18 +00:00
parent 9f1562a599
commit 471df8f512
1 changed files with 1 additions and 1 deletions

2
rtp.c
View File

@ -449,7 +449,7 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
if (ext) {
/* RTP Extension present */
hdrlen += 4;
hdrlen += (rtpheader[3] & 0xffff) << 2;
hdrlen += (ntohl(rtpheader[3]) & 0xffff) << 2;
}
if (res < hdrlen) {