summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <cvicentiu@gmail.com>2013-10-18 05:13:22 -0700
committerSergei Golubchik <sergii@pisem.net>2013-10-18 05:13:22 -0700
commitccd0c39cf4038cb08b18947fa5530da488abd6e7 (patch)
treecbc113cd8445580f055f80347b759ba7ff2f4a97 /sql
parent84a2f06fb205df203476af16594176d83e0873b7 (diff)
downloadmariadb-git-ccd0c39cf4038cb08b18947fa5530da488abd6e7.tar.gz
Fixed crash caused by dereferencing null pointer. The comparison is no longer necessary there.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_acl.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 091c55ae162..8d8672dbc3e 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -5469,12 +5469,11 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
if (!(~tl->grant.privilege & want_access))
continue;
- if (want_access & ~((grant_table ? grant_table->cols : 0) |
+ if ((want_access&= ~((grant_table ? grant_table->cols : 0) |
(grant_table_role ? grant_table_role->cols : 0) |
- tl->grant.privilege))
+ tl->grant.privilege)))
{
- want_access &= ~(grant_table->cols | tl->grant.privilege);
- goto err; // impossible
+ goto err; // impossible
}
}
if (locked)