mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-07 16:23:38 +03:00
check nullptr in ESP8266WebServer (#3958)
This commit is contained in:
parent
4a0cdca28c
commit
58937dd489
@ -179,6 +179,8 @@ bool ESP8266WebServer::_parseRequest(WiFiClient& client) {
|
|||||||
if (!isForm){
|
if (!isForm){
|
||||||
size_t plainLength;
|
size_t plainLength;
|
||||||
char* plainBuf = readBytesWithTimeout(client, contentLength, plainLength, HTTP_MAX_POST_WAIT);
|
char* plainBuf = readBytesWithTimeout(client, contentLength, plainLength, HTTP_MAX_POST_WAIT);
|
||||||
|
if (!plainBuf)
|
||||||
|
return false;
|
||||||
if (plainLength < contentLength) {
|
if (plainLength < contentLength) {
|
||||||
free(plainBuf);
|
free(plainBuf);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user