diff options
| author | Machiavelli <machiavelli.trinity@gmail.com> | 2013-09-13 12:09:26 -0700 | 
|---|---|---|
| committer | Machiavelli <machiavelli.trinity@gmail.com> | 2013-09-13 12:09:26 -0700 | 
| commit | 2e15f78305cd8be65bf43236482d1446d0b0d970 (patch) | |
| tree | f687a113ec117faa6271707b6c57dd86c716613d | |
| parent | cb4bf1fd97029d7bc163759b185505944f3947a3 (diff) | |
| parent | 6581d7db85987970ff3bec57fa81aa76ce39c038 (diff) | |
Merge pull request #10801 from jackpoz/account_password_crashfix
Core/Commands: Fix NULL dereference crash in .account password
| -rw-r--r-- | src/server/scripts/Commands/cs_account.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 6fcf9dfdbec..f0d27104035 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -453,9 +453,9 @@ public:          char* oldPassword = strtok((char*)args, " ");    // This extracts [$oldpassword]          char* newPassword = strtok(NULL, " ");           // This extracts [$newpassword]          char* passwordConfirmation = strtok(NULL, " ");  // This extracts [$newpasswordconfirmation] -        char* emailConfirmation = NULL;                  // This defines the emailConfirmation variable, which is optional depending on sec type. +        const char* emailConfirmation;                   // This defines the emailConfirmation variable, which is optional depending on sec type.          if (!(emailConfirmation = strtok(NULL, " ")))    // This extracts [$emailconfirmation]. If it doesn't exist, however... -            emailConfirmation = '\0';                    // ... it's simply "" for emailConfirmation. +            emailConfirmation = "";                      // ... it's simply "" for emailConfirmation.          //Is any of those variables missing for any reason ? We return false.          if (!oldPassword || !newPassword || !passwordConfirmation)  | 
