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

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1-win, trunk-win
    • Fix Version/s: 1-win, trunk-win
    • Component/s: util
    • Labels:
      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-1-win.1.patch
          0.8 kB
          Chris Nauroth
        2. HADOOP-9110-branch-trunk-win.1.patch
          0.6 kB
          Chris Nauroth

        Issue Links

          Activity

            People

            • Assignee:
              cnauroth Chris Nauroth
              Reporter:
              cnauroth Chris Nauroth

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment