Sophie

Sophie

distrib > Mageia > 1 > i586 > media > tainted-release-src > by-pkgid > f473b7b4d03aac3dab3be9a386f5c81c > files > 11

mplayer-1.0-1.rc4.0.r32713.5.mga1.tainted.src.rpm

diff -p -up mplayer/stream/librtsp/rtsp_session.c.rtsp-extra-fixes mplayer/stream/librtsp/rtsp_session.c
--- mplayer/stream/librtsp/rtsp_session.c.rtsp-extra-fixes	2009-07-01 22:01:58.000000000 +0200
+++ mplayer/stream/librtsp/rtsp_session.c	2009-07-01 22:09:08.000000000 +0200
@@ -166,8 +166,8 @@ rtsp_session_t *rtsp_session_start(int f
     }
 
     rtsp_session->real_session = init_real_rtsp_session ();
-    if(!strncmp(h->streams[0]->mime_type, "application/vnd.rn-rmadriver", h->streams[0]->mime_type_size) ||
-       !strncmp(h->streams[0]->mime_type, "application/smil", h->streams[0]->mime_type_size)) {
+    if(h->streams[0] && (!strncmp(h->streams[0]->mime_type, "application/vnd.rn-rmadriver", h->streams[0]->mime_type_size) ||
+       !strncmp(h->streams[0]->mime_type, "application/smil", h->streams[0]->mime_type_size))) {
       rtsp_session->real_session->header_len = 0;
       rtsp_session->real_session->recv_size = 0;
       rtsp_session->real_session->rdt_rawdata = 1;
diff -p -up mplayer/stream/realrtsp/sdpplin.c.rtsp-extra-fixes mplayer/stream/realrtsp/sdpplin.c
--- mplayer/stream/realrtsp/sdpplin.c.rtsp-extra-fixes	2009-07-01 22:01:58.000000000 +0200
+++ mplayer/stream/realrtsp/sdpplin.c	2009-07-01 22:10:27.000000000 +0200
@@ -276,6 +276,13 @@ sdpplin_t *sdpplin_parse(char *data) {
 
     if (filter(data, "m=", &buf)) {
       sdpplin_stream_t *stream=sdpplin_parse_stream(&data);
+      if (!stream) {
+        mp_msg(MSGT_OPEN, MSGL_ERR, "sdpplin: can't parse stream\n");
+        free(desc);
+        free(buf);
+        free(decoded);
+        return NULL;
+      }
 #ifdef LOG
       printf("got data for stream id %u\n", stream->stream_id);
 #endif