Skip to content

Commit

Permalink
Fixes Malloc (espressif#9012)
Browse files Browse the repository at this point in the history
Fixes `malloc()` call preventing it from using function pointer reference instead of actually calling the function itself.
  • Loading branch information
SuGlider authored Dec 18, 2023
1 parent 0aefc94 commit 71b1d76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/WebServer/src/WebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 71b1d76

Please sign in to comment.