diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-14 09:55:14 -0500 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-14 09:55:14 -0500 |
commit | 275189a2bd71cf49d66374c44d3de2262d323460 (patch) | |
tree | 2eee9cfa33c7f47b6989e8a7bd4f4ea5249f7fd3 /libavformat/mmst.c | |
parent | 08a459f096106f13c03182eed4b7cb725dc4a0ae (diff) | |
download | ffmpeg-275189a2bd71cf49d66374c44d3de2262d323460.tar.gz |
mmst: fix reading uninitialized data for ping packets.
Fixes errors after a few minutes (first ping) when playing back
mmst://wm.bbc.co.uk/wms/bbc7coyopa/bbc7_-_friday_0430.wma
Diffstat (limited to 'libavformat/mmst.c')
-rw-r--r-- | libavformat/mmst.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/mmst.c b/libavformat/mmst.c index ad87bbf250..a2b55b5c8e 100644 --- a/libavformat/mmst.c +++ b/libavformat/mmst.c @@ -290,8 +290,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst) return read_result < 0 ? read_result : AVERROR_IO; } packet_type= AV_RL16(mms->in_buffer+36); - hr = AV_RL32(mms->in_buffer + 40); - if (hr) { + if (read_result >= 44 && (hr = AV_RL32(mms->in_buffer + 40))) { av_log(NULL, AV_LOG_ERROR, "Server sent a message with packet type 0x%x and error status code 0x%08x\n", packet_type, hr); return AVERROR_UNKNOWN; |