Skip to content

Commit

Permalink
Fixed padding null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Atlas42 authored May 27, 2024
1 parent f75942b commit 69f869c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rtp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ rtp_error_t uvgrtp::rtp::packet_handler(void* args, int rce_flags, uint8_t* pack
* valid and subtract the amount of padding bytes from payload length */
if ((*out)->header.padding) {
UVG_LOG_DEBUG("Frame contains padding");
uint8_t padding_len = (*out)->payload[(*out)->payload_len - 1];
uint8_t padding_len = packet[size - 1];

if (!padding_len || (*out)->payload_len <= padding_len) {
uvgrtp::frame::dealloc_frame(*out);
Expand Down

0 comments on commit 69f869c

Please sign in to comment.