Skip to content

Commit

Permalink
Correction for my previous commit.
Browse files Browse the repository at this point in the history
CORE-6317 - Server is crashing on long GRANT statement.
  • Loading branch information
asfernandes committed May 28, 2020
1 parent e1bfd75 commit f6c912f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dsql/DdlNodes.epp
Original file line number Diff line number Diff line change
Expand Up @@ -11112,10 +11112,11 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G
const MetaName objName(object ? object->second : "");
bool crdb = false;

const char* privileges = privs ? privs : "";
AutoPtr<char, ArrayDelete> privileges(new char[MAX(strlen(ALL_PRIVILEGES), strlen(privs ? privs : "")) + 1]);
strcpy(privileges, privs ? privs : "");

if (strcmp(privileges, "A") == 0)
privileges = ALL_PRIVILEGES;
strcpy(privileges, ALL_PRIVILEGES);

char* cPtr = strchr(privileges, 'C');

Expand Down

0 comments on commit f6c912f

Please sign in to comment.