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
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
681364f13e
commit
d5862b4fe0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user