summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-09-02 10:22:08 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-09-02 10:22:08 +0000
commit079a64ae8d93cb30adedbd1ebd4a40b36e805a99 (patch)
treef7972d9ce8e84fe2b376fcf3df4e58e5c5d8a452 /stream
parent5c4a06530d13948b68e1acb34868bf80021be1aa (diff)
downloadmpv-079a64ae8d93cb30adedbd1ebd4a40b36e805a99.tar.bz2
mpv-079a64ae8d93cb30adedbd1ebd4a40b36e805a99.tar.xz
Make sure we do not strdup(NULL), avoids a crash with non-real streams.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29621 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/realrtsp/real.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stream/realrtsp/real.c b/stream/realrtsp/real.c
index dd0f5d4461..a5b37f6e34 100644
--- a/stream/realrtsp/real.c
+++ b/stream/realrtsp/real.c
@@ -441,7 +441,10 @@ rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwidt
int i;
/* get challenge */
- challenge1=strdup(rtsp_search_answers(rtsp_session,"RealChallenge1"));
+ challenge1=rtsp_search_answers(rtsp_session,"RealChallenge1");
+ if (!challenge1)
+ goto out;
+ challenge1=strdup(challenge1);
#ifdef LOG
printf("real: Challenge1: %s\n", challenge1);
#endif