netstack告警

Signed-off-by: maqianli <15735184237@163.com>
This commit is contained in:
m30063213 2024-11-20 20:11:35 +08:00
parent 1a6d133184
commit 829219df8b
2 changed files with 9 additions and 2 deletions

View File

@ -279,7 +279,7 @@ void HttpSessionCreateTaskFuzzTest(const uint8_t *data, size_t size)
void HttpClientTaskGetHttpVersionFuzzTest(const uint8_t *data, size_t size)
{
if (data == nullptr) {
if ((data == nullptr) || (size < 1)) {
return;
}
@ -309,6 +309,10 @@ void HttpClientTaskGetHttpVersionFuzzTest(const uint8_t *data, size_t size)
request.SetRequestTime(testData);
result = request.GetRequestTime();
task->GetHttpVersion(ptcl);
request = CreateHttpClientRequest(data, size);
task = HttpSession::GetInstance().CreateTask(request);
task->SetOtherCurlOption(task->curlHandle_);
}
void HttpClientTaskSetHttpProtocolFuzzTest(const uint8_t *data, size_t size)

View File

@ -119,9 +119,12 @@ void ConnectFuzzTest(const uint8_t *data, size_t size)
void SendFuzzTest(const uint8_t *data, size_t size)
{
if (data == nullptr) {
if ((data == nullptr) || (size == 0)) {
return;
}
g_baseFuzzData = data;
g_baseFuzzSize = size;
g_baseFuzzPos = 0;
TLSSocket tlsSocket;
Socket::TCPSendOptions options;
std::string str = GetStringFromData(STR_LEN);