Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null pointer in rtp.cc #220

Closed
Atlas42 opened this issue May 27, 2024 · 2 comments
Closed

Null pointer in rtp.cc #220

Atlas42 opened this issue May 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Atlas42
Copy link
Contributor

Atlas42 commented May 27, 2024

I had a segfault here :

uint8_t padding_len = (*out)->payload[(*out)->payload_len - 1];

The (*out)->payload is null, and if I am reading the code well, is only initialized a few lines after.

I believe the proper code should be:
uint8_t padding_len = packet[size - 1];
But I am not entirely sure.

@jrsnen jrsnen added the bug Something isn't working label May 28, 2024
@jrsnen
Copy link
Member

jrsnen commented May 28, 2024

We haven't tested the padding much. At least, it should not crash if the payload size is 0.

BR, Joni

jrsnen added a commit that referenced this issue Jul 25, 2024
Fixing Null pointer in rtp.cc #220
@jrsnen
Copy link
Member

jrsnen commented Jul 25, 2024

Fixed by 69f869c. Thanks.

@jrsnen jrsnen closed this as completed Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants