]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
rtsp: Convert assertion into debug log
authorStefan Eissing <stefan@eissing.org>
Fri, 19 Jan 2024 09:15:03 +0000 (10:15 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 19 Jan 2024 11:15:36 +0000 (12:15 +0100)
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

lib/rtsp.c

index dba8ae7a67bfef40458294db3fe506340aa06cf1..26f473534473515d3cb2977f5fa75915b78eaf92 100644 (file)
@@ -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 */