Skip to content

Commit 58937dd

Browse files
d-a-vigrr
authored andcommitted
check nullptr in ESP8266WebServer (#3958)
1 parent 4a0cdca commit 58937dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/ESP8266WebServer/src/Parsing.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ bool ESP8266WebServer::_parseRequest(WiFiClient& client) {
179179
if (!isForm){
180180
size_t plainLength;
181181
char* plainBuf = readBytesWithTimeout(client, contentLength, plainLength, HTTP_MAX_POST_WAIT);
182+
if (!plainBuf)
183+
return false;
182184
if (plainLength < contentLength) {
183185
free(plainBuf);
184186
return false;

0 commit comments

Comments
 (0)