You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2014/06/21 05:49:24 UTC
[jira] [Updated] (HADOOP-10733) Potential null dereference in
CredentialShell#promptForCredential()
[ https://issues.apache.org/jira/browse/HADOOP-10733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated HADOOP-10733:
----------------------------
Description:
{code}
char[] newPassword1 = c.readPassword("Enter password: ");
char[] newPassword2 = c.readPassword("Enter password again: ");
noMatch = !Arrays.equals(newPassword1, newPassword2);
if (noMatch) {
Arrays.fill(newPassword1, ' ');
{code}
newPassword1 might be null, leading to NullPointerException in Arrays.fill() call.
Similar issue for the following call on line 381:
{code}
Arrays.fill(newPassword2, ' ');
{code}
was:
{code}
char[] newPassword1 = c.readPassword("Enter password: ");
char[] newPassword2 = c.readPassword("Enter password again: ");
noMatch = !Arrays.equals(newPassword1, newPassword2);
if (noMatch) {
Arrays.fill(newPassword1, ' ');
{code}
newPassword1 might be null, leading to NullPointerException in Arrays.fill() call.
> Potential null dereference in CredentialShell#promptForCredential()
> -------------------------------------------------------------------
>
> Key: HADOOP-10733
> URL: https://issues.apache.org/jira/browse/HADOOP-10733
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Minor
>
> {code}
> char[] newPassword1 = c.readPassword("Enter password: ");
> char[] newPassword2 = c.readPassword("Enter password again: ");
> noMatch = !Arrays.equals(newPassword1, newPassword2);
> if (noMatch) {
> Arrays.fill(newPassword1, ' ');
> {code}
> newPassword1 might be null, leading to NullPointerException in Arrays.fill() call.
> Similar issue for the following call on line 381:
> {code}
> Arrays.fill(newPassword2, ' ');
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)