mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Fix buffer overflow in ESP8266WebServer::authenticate (#1790)
This commit is contained in:
@ -93,7 +93,7 @@ bool ESP8266WebServer::authenticate(const char * username, const char * password
|
||||
authReq = authReq.substring(6);
|
||||
authReq.trim();
|
||||
char toencodeLen = strlen(username)+strlen(password)+1;
|
||||
char *toencode = new char[toencodeLen];
|
||||
char *toencode = new char[toencodeLen + 1];
|
||||
if(toencode == NULL){
|
||||
authReq = String();
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user