From 7473a37fcc8e9e191f1ff2efe3239ec95fe49319 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 23 Jun 2006 22:23:07 +0000 Subject: prevent a buffer overflow to occur at teardown git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18804 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/librtsp/rtsp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libmpdemux') diff --git a/libmpdemux/librtsp/rtsp.c b/libmpdemux/librtsp/rtsp.c index 27d9dd37a5..131f2045f0 100644 --- a/libmpdemux/librtsp/rtsp.c +++ b/libmpdemux/librtsp/rtsp.c @@ -594,8 +594,10 @@ int rtsp_request_teardown(rtsp_t *s, const char *what) { } rtsp_send_request (s, RTSP_METHOD_TEARDOWN, buf); free (buf); - - return rtsp_get_answers(s); + + /* after teardown we're done with RTSP streaming, no need to get answer as + reading more will only result to garbage and buffer overflow */ + return RTSP_STATUS_OK; } /* -- cgit v1.2.3