From 9cf0ccc6b9dac4355f923ed0a9f316a22bf7089f Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 29 Aug 2018 18:25:17 +0800 Subject: [PATCH] bug fixed --- src/Rtmp/RtmpParser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Rtmp/RtmpParser.cpp b/src/Rtmp/RtmpParser.cpp index 67605b50..ff0f5edd 100644 --- a/src/Rtmp/RtmpParser.cpp +++ b/src/Rtmp/RtmpParser.cpp @@ -180,6 +180,10 @@ inline bool RtmpParser::inputAudio(const RtmpPacket::Ptr &pkt) { return false; } inline void RtmpParser::onGetAAC(const char* pcData, int iLen, uint32_t ui32TimeStamp) { + if(iLen + 7 > sizeof(m_adts.data)){ + WarnL << "Illegal adts data, exceeding the length limit."; + return; + } //添加adts头 memcpy(m_adts.data + 7, pcData, iLen); m_adts.aac_frame_length = 7 + iLen;