Skip to content

RTC: Fix null pointer crash in RTC2RTMP when start packet is missing. v6.0.175#4451

Merged
winlinvip merged 3 commits intoossrs:6.0releasefrom
suzp1984:bugfix/rtp_packet_ref_segv_crash
Aug 26, 2025
Merged

RTC: Fix null pointer crash in RTC2RTMP when start packet is missing. v6.0.175#4451
winlinvip merged 3 commits intoossrs:6.0releasefrom
suzp1984:bugfix/rtp_packet_ref_segv_crash

Conversation

@suzp1984
Copy link
Copy Markdown
Contributor

@suzp1984 suzp1984 commented Aug 24, 2025

Try to fix #4450

Cause

The SRS transcode rtp packets, whose sequence number in range [start, end], to one rtmp packet, but when the first rtp packet is empty, then this crash happens.

check #4450 for details.

Impact

5.0release and 6.0release branch.
develop branch already has its own solution.

So this PR is targeting to 6.0release.

Solution

find the first not empty rtp packet in seq range [start, end].

This bug only exist in 5.0 and 6.0, the develop or 7.0 already has its
own solution.
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Aug 24, 2025
@winlinvip winlinvip changed the title Bugfix first rtp packet empty in seq range [start, end] RTC: Fix null pointer crash in packet_video_rtmp when start packet is missing Aug 26, 2025
@winlinvip winlinvip changed the title RTC: Fix null pointer crash in packet_video_rtmp when start packet is missing RTC: Fix null pointer crash in RTC2RTMP when start packet is missing Aug 26, 2025
@winlinvip winlinvip changed the title RTC: Fix null pointer crash in RTC2RTMP when start packet is missing RTC: Fix null pointer crash in RTC2RTMP when start packet is missing. v6.0.175 Aug 26, 2025
@winlinvip winlinvip merged commit c1a8a5f into ossrs:6.0release Aug 26, 2025
17 checks passed
winlinvip added a commit that referenced this pull request Aug 26, 2025
… v6.0.175 v7.0.63 (#4451)

Try to fix #4450

The SRS transcode rtp packets, whose sequence number in range [start,
end], to one rtmp packet, but when the first rtp packet is empty, then
this crash happens.

check #4450 for details.

5.0release and 6.0release branch.
develop branch already has its own solution.

So this PR is targeting to **6.0release**.

find the first not empty rtp packet in seq range [start, end].

---------

Co-authored-by: OSSRS-AI <winlinam@gmail.com>
Co-authored-by: winlin <winlinvip@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EnglishNative This issue is conveyed exclusively in English.

Development

Successfully merging this pull request may close these issues.

3 participants