Commit 4f7f9af1 authored by benoit's avatar benoit

check udp_read_packet return value not to access uninitialized memory

patch by Eric Paul: [eric paul gmail com]
original thread: [FFmpeg-devel] [PATCH] : libavformat segfault when a
RTSP reading is interrupted
date: 07/05/2007 03:13 PM


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9492 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b97a6150
...@@ -1194,7 +1194,7 @@ static int rtsp_read_packet(AVFormatContext *s, ...@@ -1194,7 +1194,7 @@ static int rtsp_read_packet(AVFormatContext *s,
case RTSP_PROTOCOL_RTP_UDP: case RTSP_PROTOCOL_RTP_UDP:
case RTSP_PROTOCOL_RTP_UDP_MULTICAST: case RTSP_PROTOCOL_RTP_UDP_MULTICAST:
len = udp_read_packet(s, &rtsp_st, buf, sizeof(buf)); len = udp_read_packet(s, &rtsp_st, buf, sizeof(buf));
if (rtsp_st->rtp_ctx) if (len >=0 && rtsp_st->rtp_ctx)
rtp_check_and_send_back_rr(rtsp_st->rtp_ctx, len); rtp_check_and_send_back_rr(rtsp_st->rtp_ctx, len);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment