1
0
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:
Ivan Grokhotkov
2016-03-18 23:33:35 +03:00
parent 5227b32531
commit a14ae347e4

View File

@ -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;