Fixes Malloc (#9012)

Fixes `malloc()` call preventing it from using function pointer reference instead of actually calling the function itself.
This commit is contained in:
Rodrigo Garcia 2023-12-18 06:35:12 -03:00 committed by GitHub
parent 0aefc94470
commit 71b1d767af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,7 @@ bool WebServer::authenticate(const char * username, const char * password){
authReq = authReq.substring(6);
authReq.trim();
char toencodeLen = strlen(username)+strlen(password)+1;
char *toencode = (char *)malloc[toencodeLen + 1];
char *toencode = (char *)malloc(toencodeLen + 1);
if(toencode == NULL){
authReq = "";
return false;