Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-16561

Handle error returned by strtol

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      strtol is used in hdfs-chmod.cc. The call to strtol could error out when an invalid input is provided. Need to handle the error given out by strtol.

      Tasks to do -
      1. Detect the error returned by strtol. The strtol documentation explains how to do so.
      2. Return false to the caller if the error is detected.
      3. Extend this unit test and add a case which exercises this by passing an invalid input. Please refer to this PR to get more context on how this unit test is written - https://github.com/apache/hadoop/pull/3588.

      Attachments

        Issue Links

          Activity

            People

              gaurava Gautham Banasandra
              gaurava Gautham Banasandra
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 10m
                  3h 10m