diff options
author | est31 <MTest31@outlook.com> | 2015-09-30 00:38:05 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-09-30 09:19:40 +0200 |
commit | 0bf1984d2c9fb3a9dc73303551c18906c3c9482b (patch) | |
tree | 68e5bbcfd4914b2389c08947e2581e4c6c50f74f /src/client.cpp | |
parent | 2a7d01b833da7b93125ad31e787f3e2145a22ec5 (diff) | |
download | minetest-0bf1984d2c9fb3a9dc73303551c18906c3c9482b.tar.gz minetest-0bf1984d2c9fb3a9dc73303551c18906c3c9482b.tar.bz2 minetest-0bf1984d2c9fb3a9dc73303551c18906c3c9482b.zip |
Fix some SRP issues
-> Remove memory allocation bugs
-> Merge changes from upstream, enabling customizeable memory allocation
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp index 4a9398f70..b2e21743c 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -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; |