summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2005-04-16 07:10:51 +0000
committerMike Melanson <mike@multimedia.cx>2005-04-16 07:10:51 +0000
commitf1014c20bdc0aa2395bcc05371c859bfce30361d (patch)
tree3bdb0f4328ba9d825352772acdbcc1caa7236ca4 /src
parent1ecfe4939b3e55c75c5b46df3c7f200179ef227b (diff)
downloadxine-lib-f1014c20bdc0aa2395bcc05371c859bfce30361d.tar.gz
xine-lib-f1014c20bdc0aa2395bcc05371c859bfce30361d.tar.bz2
address buffer overflow condition
CVS patchset: 7458 CVS date: 2005/04/16 07:10:51
Diffstat (limited to 'src')
-rw-r--r--src/input/librtsp/rtsp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input/librtsp/rtsp.c b/src/input/librtsp/rtsp.c
index 89ab63c80..d3221c463 100644
--- a/src/input/librtsp/rtsp.c
+++ b/src/input/librtsp/rtsp.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: rtsp.c,v 1.18 2004/07/25 17:13:54 mroi Exp $
+ * $Id: rtsp.c,v 1.19 2005/04/16 07:10:51 tmmm Exp $
*
* a minimalistic implementation of rtsp protocol,
* *not* RFC 2326 compilant yet.
@@ -218,6 +218,7 @@ static int rtsp_get_answers(rtsp_t *s) {
unsigned int answer_seq;
char **answer_ptr=s->answers;
int code;
+ int ans_count = 0;
answer=rtsp_get(s);
if (!answer)
@@ -268,7 +269,7 @@ static int rtsp_get_answers(rtsp_t *s) {
}
*answer_ptr=answer;
answer_ptr++;
- } while (strlen(answer)!=0);
+ } while ((strlen(answer)!=0) && (++ans_count < MAX_FIELDS));
s->cseq++;