Skip to content

Commit

Permalink
Merge pull request #222 from Atlas42/master
Browse files Browse the repository at this point in the history
Fixing Null pointer in rtp.cc #220
  • Loading branch information
jrsnen authored Jul 25, 2024
2 parents 1569045 + 69f869c commit af65310
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 af65310

Please sign in to comment.