changeset 18801:f17474882196

prevent a buffer overflow to occur at teardown
author ben
date Fri, 23 Jun 2006 22:23:07 +0000
parents 1cd24dd02261
children b52ed08b17ad
files libmpdemux/librtsp/rtsp.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/librtsp/rtsp.c	Fri Jun 23 21:40:07 2006 +0000
+++ b/libmpdemux/librtsp/rtsp.c	Fri Jun 23 22:23:07 2006 +0000
@@ -594,8 +594,10 @@
   }
   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;
 }
 
 /*