hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Srinivas (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HADOOP-9110) winutils ls off-by-one error indexing MONTHS array can cause access violation
Date Sun, 02 Dec 2012 03:05:59 GMT

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

Suresh Srinivas resolved HADOOP-9110.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: trunk-win
                   1-win
     Hadoop Flags: Reviewed

Patch committed to both branch-1-win and branch-trunk-win. 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
>             Fix For: 1-win, trunk-win
>
>         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