mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修复丢包导致aac确实导致内存越界的bug: #1363
This commit is contained in:
parent
402214c3d4
commit
75465311d9
@ -279,6 +279,11 @@ bool AACTrack::inputFrame(const Frame::Ptr &frame) {
|
||||
}
|
||||
auto sub_frame = std::make_shared<FrameInternal<FrameFromPtr> >(frame, (char *) ptr, frame_len, ADTS_HEADER_LEN);
|
||||
ptr += frame_len;
|
||||
if (ptr > end) {
|
||||
WarnL << "invalid aac length in adts header: " << frame_len
|
||||
<< ", remain data size: " << end - (ptr - frame_len);
|
||||
break;
|
||||
}
|
||||
sub_frame->setCodecId(CodecAAC);
|
||||
if (inputFrame_l(sub_frame)) {
|
||||
ret = true;
|
||||
|
Loading…
Reference in New Issue
Block a user