hadoop-common-issues mailing list archives

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

    [ https://issues.apache.org/jira/browse/HADOOP-9110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507860#comment-13507860
] 

Chuan Liu commented on HADOOP-9110:
-----------------------------------

+1 Thanks for the quick fix!
                
> 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