mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-04 18:03:20 +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;
|
||||
plainBuf[plainLen] = '\0';
|
||||
} while (plainLen < contentLength);
|
||||
/* if data loss, exit */
|
||||
if (plainBuf == nullptr) return false;
|
||||
if (plainLen < contentLength)
|
||||
{
|
||||
free(plainBuf);
|
||||
return false;
|
||||
}
|
||||
#ifdef DEBUG_ESP_HTTP_SERVER
|
||||
DEBUG_OUTPUT.print("Plain: ");
|
||||
DEBUG_OUTPUT.println(plainBuf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user