]> granicus.if.org Git - curl/commitdiff
rtsp: avoid SIGSEGV on malformed header
authorKamil Dudka <kdudka@redhat.com>
Mon, 6 Sep 2010 14:03:37 +0000 (16:03 +0200)
committerKamil Dudka <kdudka@redhat.com>
Mon, 6 Sep 2010 14:03:37 +0000 (16:03 +0200)
lib/rtsp.c

index 16dfa27cb518005f52d773fc330dd4d4f4a8f348..1254c7389568faa2e3951e70ce1d028b4b0b9961 100644 (file)
@@ -706,10 +706,10 @@ CURLcode Curl_rtsp_parseheader(struct connectdata *conn,
 
     /* Find the first non-space letter */
     start = header + 9;
-    while(start && ISSPACE(*start))
+    while(*start && ISSPACE(*start))
       start++;
 
-    if(!start) {
+    if(!*start) {
       failf(data, "Got a blank Session ID");
     }
     else if(data->set.str[STRING_RTSP_SESSION_ID]) {