mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-13 13:01:55 +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 = authReq.substring(6);
|
||||||
authReq.trim();
|
authReq.trim();
|
||||||
char toencodeLen = strlen(username)+strlen(password)+1;
|
char toencodeLen = strlen(username)+strlen(password)+1;
|
||||||
char *toencode = new char[toencodeLen];
|
char *toencode = new char[toencodeLen + 1];
|
||||||
if(toencode == NULL){
|
if(toencode == NULL){
|
||||||
authReq = String();
|
authReq = String();
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user