[MPlayer-cvslog] CVS: main/libmpdemux/realrtsp rtsp.c, 1.13, 1.14 sdpplin.c, 1.2, 1.3
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Wed Jun 22 13:58:59 CEST 2005
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libmpdemux/realrtsp
In directory mail:/var2/tmp/cvs-serv10181/libmpdemux/realrtsp
Modified Files:
rtsp.c sdpplin.c
Log Message:
fix illegal memory accesses
Index: rtsp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/realrtsp/rtsp.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- rtsp.c 3 Jun 2005 15:33:26 -0000 1.13
+++ rtsp.c 22 Jun 2005 11:58:56 -0000 1.14
@@ -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;
Index: sdpplin.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/realrtsp/sdpplin.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sdpplin.c 24 Apr 2004 10:33:19 -0000 1.2
+++ sdpplin.c 22 Jun 2005 11:58:56 -0000 1.3
@@ -84,12 +84,12 @@
out[k++] = (b[2] << 6) | b[3];
i = a[2] == '=' ? 1 : (a[3] == '=' ? 2 : 3);
if (i < 3) {
- out[k]=0;
+ out[k - 1]=0;
*size=k;
return out;
}
}
- out[k]=0;
+ out[k - 1]=0;
*size=k;
return out;
}
More information about the MPlayer-cvslog
mailing list