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

winutils ls off-by-one error indexing MONTHS array can cause access violation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1-win, trunk-win
    • 1-win, trunk-win
    • util
    • None

    Description

      In ls.c, the LsPrintLine function uses the wMonth field of a SYSTEMTIME struct to index into MONTHS, an array of 12 elements containing string representations of the months. The wMonth field is 1-based (1=January), but indexing into an array is zero-based. This gives the wrong month, and since we just crossed into month 12, it also has started causing an access violation.

      Attachments

        1. HADOOP-9110-branch-trunk-win.1.patch
          0.6 kB
          Chris Nauroth
        2. HADOOP-9110-branch-1-win.1.patch
          0.8 kB
          Chris Nauroth

        Issue Links

          Activity

            People

              cnauroth Chris Nauroth
              cnauroth Chris Nauroth
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: