hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-9110) winutils ls off-by-one error indexing MONTHS array can cause access violation
Date Sat, 01 Dec 2012 03:43:57 GMT

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

Chris Nauroth updated HADOOP-9110:
----------------------------------

    Attachment: HADOOP-9110-branch-trunk-win.1.patch
                HADOOP-9110-branch-1-win.1.patch

I have attached patches for both branch-1-win and branch-trunk-win.  Please credit these patches
to Thejas Nair, the original author.

Thank you,
--Chris

                
> winutils ls off-by-one error indexing MONTHS array can cause access violation
> -----------------------------------------------------------------------------
>
>                 Key: HADOOP-9110
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9110
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 1-win, trunk-win
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HADOOP-9110-branch-1-win.1.patch, HADOOP-9110-branch-trunk-win.1.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message