commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r802453 - /commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c
Date Sat, 08 Aug 2009 20:39:11 GMT
Author: mturk
Date: Sat Aug  8 20:39:11 2009
New Revision: 802453

URL: http://svn.apache.org/viewvc?rev=802453&view=rev
Log:
We only need two extra places

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c?rev=802453&r1=802452&r2=802453&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/dirent.c Sat Aug  8 20:39:11 2009
@@ -46,7 +46,7 @@
         ACR_SET_OS_ERROR(ACR_ENOTDIR);
         return NULL;
     }
-    if (utf8_to_unicode_path(wpath, ACR_HBUFF_LEN - 3, path, ACR_HBUFF_LEN - 3))
+    if (utf8_to_unicode_path(wpath, ACR_HBUFF_LEN - 2, path, ACR_HBUFF_LEN - 2))
         return NULL;
 
     if ((rc = GetFileAttributesW(wpath)) == INVALID_FILE_ATTRIBUTES)
@@ -59,8 +59,8 @@
     if (!(dir = malloc(sizeof(DIR))))
         return NULL;
 
-    rc = GetFullPathNameW(wpath, ACR_HBUFF_LEN - 3, dir->d_name, NULL);
-    if (rc == 0 || rc > ACR_HBUFF_LEN - 3) {
+    rc = GetFullPathNameW(wpath, ACR_HBUFF_LEN - 2, dir->d_name, NULL);
+    if (rc == 0 || rc > ACR_HBUFF_LEN - 2) {
         free(dir);
         /* Invalid file name */
         ACR_SET_OS_ERROR(ACR_EBADF);



Mime
View raw message