Skip to content

Commit 1edde04

Browse files
committed
check nullptr in ESP8266WebServer
1 parent bd261c0 commit 1edde04

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)