hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "skrho (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (HDFS-7101) Potential null dereference in DFSck#doWork()
Date Thu, 25 Sep 2014 08:52:34 GMT

     [ https://issues.apache.org/jira/browse/HDFS-7101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

skrho reassigned HDFS-7101:
---------------------------

    Assignee: skrho

> Potential null dereference in DFSck#doWork()
> --------------------------------------------
>
>                 Key: HDFS-7101
>                 URL: https://issues.apache.org/jira/browse/HDFS-7101
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: skrho
>            Priority: Minor
>
> {code}
>     String lastLine = null;
>     int errCode = -1;
>     try {
>       while ((line = input.readLine()) != null) {
> ...
>     if (lastLine.endsWith(NamenodeFsck.HEALTHY_STATUS)) {
>       errCode = 0;
> {code}
> If readLine() throws exception, lastLine may be null, leading to NPE.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message