提交 5aa09304 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Fix #252

上级 b3938024
#include "fuzzers.hpp"
#include "RTC/RtpPacket.hpp"
#include <cstring> // std::memory()
using namespace RTC;
......@@ -10,7 +11,13 @@ namespace fuzzers
if (!RtpPacket::IsRtp(data, len))
return;
RtpPacket* packet = RtpPacket::Parse(data, len);
// We need to clone the given data into a separate buffer because setters
// below will try to write into the packet memory.
static uint8_t data2[524288];
std::memcpy(data2, data, len);
RtpPacket* packet = RtpPacket::Parse(data2, len);
if (!packet)
return;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论