mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix some SRP issues
-> Remove memory allocation bugs -> Merge changes from upstream, enabling customizeable memory allocation
This commit is contained in:
parent
2a7d01b833
commit
0bf1984d2c
4 changed files with 153 additions and 82 deletions
|
@ -1059,8 +1059,10 @@ void Client::startAuth(AuthMechanism chosen_auth_mechanism)
|
|||
m_password.length(), NULL, NULL);
|
||||
char *bytes_A = 0;
|
||||
size_t len_A = 0;
|
||||
srp_user_start_authentication((struct SRPUser *) m_auth_data,
|
||||
NULL, NULL, 0, (unsigned char **) &bytes_A, &len_A);
|
||||
SRP_Result res = srp_user_start_authentication(
|
||||
(struct SRPUser *) m_auth_data, NULL, NULL, 0,
|
||||
(unsigned char **) &bytes_A, &len_A);
|
||||
FATAL_ERROR_IF(res != SRP_OK, "Creating local SRP user failed.");
|
||||
|
||||
NetworkPacket resp_pkt(TOSERVER_SRP_BYTES_A, 0);
|
||||
resp_pkt << std::string(bytes_A, len_A) << based_on;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue