8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +01:00

Fix crash on assert or memory corruption when too long username is used for authentication
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dmitry Starodubov 2023-06-30 17:42:57 +03:00 committed by GitHub
parent 681364f13e
commit d5862b4fe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -274,6 +274,10 @@ int SrpServer::authenticate(CheckStatusWrapper* status, IServerBlock* sb, IWrite
account = sb->getLogin();
const size_t len = account.length();
if (len > SZ_LOGIN)
status_exception::raise(Arg::Gds(isc_long_login) << Arg::Num(len) << Arg::Num(SZ_LOGIN));
unsigned int length;
const unsigned char* val = sb->getData(&length);
clientPubKey.assign(val, length);