hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1416103 - in /hadoop/common/branches/branch-1-win: CHANGES.branch-1-win.txt src/winutils/ls.c
Date Sun, 02 Dec 2012 03:04:23 GMT
Author: suresh
Date: Sun Dec  2 03:04:22 2012
New Revision: 1416103

URL: http://svn.apache.org/viewvc?rev=1416103&view=rev
Log:
HADOOP-9110. winutils ls off-by-one error indexing MONTHS array can cause access violation.
Contributed by Chris Nauroth.

Modified:
    hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
    hadoop/common/branches/branch-1-win/src/winutils/ls.c

Modified: hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt?rev=1416103&r1=1416102&r2=1416103&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt Sun Dec  2 03:04:22 2012
@@ -231,3 +231,6 @@ Branch-hadoop-1-win - unreleased
 
     HADOOP-9074. Hadoop install scripts for Windows. (Steve Maine,
     Ramya Nimmagadda, Chuan Liu, Brad Sarsfield and Ivan Mitic via suresh)
+
+    HADOOP-9110. HADOOP-9110. winutils ls off-by-one error indexing MONTHS array
+    can cause access violation. (Chris Nauroth via suresh)

Modified: hadoop/common/branches/branch-1-win/src/winutils/ls.c
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/winutils/ls.c?rev=1416103&r1=1416102&r2=1416103&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/winutils/ls.c (original)
+++ hadoop/common/branches/branch-1-win/src/winutils/ls.c Sun Dec  2 03:04:22 2012
@@ -124,14 +124,14 @@ static BOOL LsPrintLine(
   {
     fwprintf(stdout, L"%10s|%d|%s|%s|%lld|%3s|%2d|%4d|%s\n",
       maskString, hardlinkCount, ownerName, groupName, fileSize.QuadPart,
-      MONTHS[stFileWriteTime.wMonth], stFileWriteTime.wDay,
+      MONTHS[stFileWriteTime.wMonth-1], stFileWriteTime.wDay,
       stFileWriteTime.wYear, path);
   }
   else
   {
     fwprintf(stdout, L"%10s %d %s %s %lld %3s %2d %4d %s\n",
       maskString, hardlinkCount, ownerName, groupName, fileSize.QuadPart,
-      MONTHS[stFileWriteTime.wMonth], stFileWriteTime.wDay,
+      MONTHS[stFileWriteTime.wMonth-1], stFileWriteTime.wDay,
       stFileWriteTime.wYear, path);
   }
 



Mime
View raw message