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

Potential null dereference in CredentialShell#promptForCredential()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.6.0
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: