# HG changeset patch # User reimar # Date 1251886928 0 # Node ID 26e0c6a16e576dca3ef6d3f958fcb1e0b658e2b9 # Parent b0ee310c221617d07aeb7bd46a6dfe3f21bb0db1 Make sure we do not strdup(NULL), avoids a crash with non-real streams. diff -r b0ee310c2216 -r 26e0c6a16e57 stream/realrtsp/real.c --- a/stream/realrtsp/real.c Wed Sep 02 10:20:45 2009 +0000 +++ b/stream/realrtsp/real.c Wed Sep 02 10:22:08 2009 +0000 @@ -441,7 +441,10 @@ 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