← Commit list

05d991a8c5

hamza
hamza
2026-02-26
SUCCESS Duration: 331s

Subject

rtsp: fix assertion failure on zero-length RTP payload

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/rtsp.c+12 -0
@@ -774,6 +774,18 @@ static CURLcode rtsp_filter_rtp(struct Curl_easy *data,
break;
rtp_buf = curlx_dyn_ptr(&rtspc->buf);
rtspc->rtp_len = RTP_PKT_LENGTH(rtp_buf) + 4;
+ if(rtspc->rtp_len == 4) {
+ /* zero-length payload, the 4-byte header is the complete RTP
+ message. Dispatch immediately without entering RTP_PARSE_DATA. */
+ DEBUGF(infof(data, "RTP write channel %d rtp_len %zu (no payload)",
+ rtspc->rtp_channel, rtspc->rtp_len));
+ result = rtp_client_write(data, rtp_buf, rtspc->rtp_len);
+ curlx_dyn_free(&rtspc->buf);
+ rtspc->state = RTP_PARSE_SKIP;
+ if(result)
+ goto out;
+ break;
+ }
rtspc->state = RTP_PARSE_DATA;
break;
}