]> git.sur5r.net Git - bacula/bacula/commitdiff
- buffer bug (found by Christopher Hull)
authorThorsten Engel <thorsten.engel@matrix-computer.com>
Mon, 24 Apr 2006 10:35:57 +0000 (10:35 +0000)
committerThorsten Engel <thorsten.engel@matrix-computer.com>
Mon, 24 Apr 2006 10:35:57 +0000 (10:35 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2963 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/win32/compat/compat.cpp

index 894c3ed47ef426ca0c9ca1ad535cd9bdd8dc3200..0dc526753a710c53f5c7ca7065c20bebcb167303 100644 (file)
@@ -974,7 +974,7 @@ readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
 
       // copy unicode
       if (dp->valid_w) {
-         char szBuf[MAX_PATH_UTF8];
+         char szBuf[MAX_PATH_UTF8+1];
          wchar_2_UTF8(szBuf,dp->data_w.cFileName);
          dp->offset += copyin(*entry, szBuf);
       } else if (dp->valid_a) { // copy ansi (only 1 will be valid)