1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-5238 Server crashes in find_role_grant_pair on SHOW GRANTS for an anonymous user

This commit is contained in:
Sergei Golubchik
2013-11-10 17:50:52 +01:00
parent ab2bf1ad0b
commit 09b63917be
3 changed files with 30 additions and 1 deletions

View File

@ -7556,7 +7556,7 @@ static ROLE_GRANT_PAIR *find_role_grant_pair(const LEX_STRING *u,
pair_key.alloc(key_length);
strmov(strmov(strmov(const_cast<char*>(pair_key.ptr()),
u->str) + 1, h->str) + 1, r->str);
safe_str(u->str)) + 1, h->str) + 1, r->str);
return (ROLE_GRANT_PAIR *)
my_hash_search(&acl_roles_mappings, (uchar*)pair_key.ptr(), key_length);