Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-2707

Potential null dereference in FSDownload

    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
    • Hadoop Flags:
      Reviewed

      Description

      Here is related code in call():

            Pattern pattern = null;
            String p = resource.getPattern();
            if (p != null) {
              pattern = Pattern.compile(p);
            }
            unpack(new File(dTmp.toUri()), new File(dFinal.toUri()), pattern);
      

      In unpack():

              RunJar.unJar(localrsrc, dst, pattern);
      

      unJar() would dereference the pattern without checking whether it is null.

        Attachments

        1. YARN-2707.v01.patch
          3 kB
          Gera Shegalov

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: