mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-07 16:23:38 +03:00
if data loss, exit
This commit is contained in:
parent
41bd7af07e
commit
b72cf2cdcf
@ -153,7 +153,13 @@ bool ESP8266WebServer::_parseRequest(WiFiClient& client) {
|
|||||||
plainLen += newLen;
|
plainLen += newLen;
|
||||||
plainBuf[plainLen] = '\0';
|
plainBuf[plainLen] = '\0';
|
||||||
} while (plainLen < contentLength);
|
} while (plainLen < contentLength);
|
||||||
|
/* if data loss, exit */
|
||||||
if (plainBuf == nullptr) return false;
|
if (plainBuf == nullptr) return false;
|
||||||
|
if (plainLen < contentLength)
|
||||||
|
{
|
||||||
|
free(plainBuf);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#ifdef DEBUG_ESP_HTTP_SERVER
|
#ifdef DEBUG_ESP_HTTP_SERVER
|
||||||
DEBUG_OUTPUT.print("Plain: ");
|
DEBUG_OUTPUT.print("Plain: ");
|
||||||
DEBUG_OUTPUT.println(plainBuf);
|
DEBUG_OUTPUT.println(plainBuf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user