From 69f869c6b6784f378a59fbeb70babf25174a9136 Mon Sep 17 00:00:00 2001 From: Atlas42 Date: Mon, 27 May 2024 17:15:54 +0200 Subject: [PATCH] Fixed padding null pointer --- src/rtp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtp.cc b/src/rtp.cc index 40763018..8ff63d89 100644 --- a/src/rtp.cc +++ b/src/rtp.cc @@ -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);