Mercurial > mplayer.hg
diff libmpdemux/realrtsp/rtsp.c @ 15797:06a9914af502
fix illegal memory accesses
author | reimar |
---|---|
date | Wed, 22 Jun 2005 11:58:56 +0000 |
parents | 941b1a71351f |
children | b313a38c69cb |
line wrap: on
line diff
--- a/libmpdemux/realrtsp/rtsp.c Wed Jun 22 09:39:27 2005 +0000 +++ b/libmpdemux/realrtsp/rtsp.c Wed Jun 22 11:58:56 2005 +0000 @@ -272,10 +272,11 @@ static char *rtsp_get(rtsp_t *s) { - int n=0; + int n=1; char *buffer = malloc(BUF_SIZE); char *string = NULL; + read_stream(s->s, buffer, 1); while (n<BUF_SIZE) { read_stream(s->s, &(buffer[n]), 1); if ((buffer[n-1]==0x0d)&&(buffer[n]==0x0a)) break;