Browse Source

rtsp: Convert assertion into debug log

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65934

- write excess bytes to the client where the standard excess bytes
  checks will report any wrongness and fail the transfer

Fixes #12738
Closes #12739
Stefan Eissing 4 months ago
parent
commit
524253dc90
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lib/rtsp.c

+ 3 - 1
lib/rtsp.c

@@ -804,7 +804,9 @@ static CURLcode rtsp_rtp_write_resp(struct Curl_easy *data,
     buf += consumed;
     blen -= consumed;
     /* either we consumed all or are at the start of header parsing */
-    DEBUGASSERT(blen == 0 || data->req.header);
+    if(blen && !data->req.header)
+      DEBUGF(infof(data, "RTSP: %zu bytes, possibly excess in response body",
+                   blen));
   }
 
   /* we want to parse headers, do so */