[FFmpeg-soc] [soc]: r5752 - mms/mmst.c
spyfeng
subversion at mplayerhq.hu
Sun Apr 11 14:50:51 CEST 2010
Author: spyfeng
Date: Sun Apr 11 14:50:51 2010
New Revision: 5752
Log:
check length_remaining before using it.
Modified:
mms/mmst.c
Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c Sat Apr 10 07:21:00 2010 (r5751)
+++ mms/mmst.c Sun Apr 11 14:50:51 2010 (r5752)
@@ -306,8 +306,6 @@ static MMSSCPacketType get_tcp_server_re
mms->incoming_packet_seq = AV_RL32(mms->incoming_buffer);
packet_id_type = mms->incoming_buffer[4];
mms->incoming_flags = mms->incoming_buffer[5];
- mms->pkt_buf_len = length_remaining;
- mms->pkt_read_ptr = mms->incoming_buffer;
if (length_remaining < 0
|| length_remaining > sizeof(mms->incoming_buffer)) {
@@ -315,6 +313,8 @@ static MMSSCPacketType get_tcp_server_re
length_remaining, sizeof(mms->incoming_buffer));
break;
}
+ mms->pkt_buf_len = length_remaining;
+ mms->pkt_read_ptr = mms->incoming_buffer;
read_result= url_read_complete(mms->mms_hd, mms->incoming_buffer, length_remaining);
if(read_result != length_remaining) {
dprintf(NULL, "read_bytes result: %d asking for %d\n",
More information about the FFmpeg-soc
mailing list