Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-10733

Potential null dereference in CredentialShell#promptForCredential()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0
    • Component/s: None
    • Labels:
      None

      Description

            char[] newPassword1 = c.readPassword("Enter password: ");
            char[] newPassword2 = c.readPassword("Enter password again: ");
            noMatch = !Arrays.equals(newPassword1, newPassword2);
            if (noMatch) {
              Arrays.fill(newPassword1, ' ');
      

      newPassword1 might be null, leading to NullPointerException in Arrays.fill() call.
      Similar issue for the following call on line 381:

            Arrays.fill(newPassword2, ' ');
      

        Attachments

        1. hadoop-10733-v1.txt
          3 kB
          Ted Yu

          Activity

            People

            • Assignee:
              yuzhihong@gmail.com Ted Yu
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: