Fix potential buffer overflow if server answers with too many lines

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15173 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rtognimp 2005-04-15 23:30:44 +00:00
parent 7a745b6560
commit 20a3f6169c
1 changed files with 2 additions and 1 deletions

View File

@ -397,6 +397,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)
@ -448,7 +449,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++;