Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2003-09-23 01:32:52 +0400
committerDanny Smith <dannysmith@users.sourceforge.net>2003-09-23 01:32:52 +0400
commitd92d731fa51ccf56bda4ff9010d271b62f774bec (patch)
treeae20a6bfbdad4356072b1bcefa47ec4311c0da8d /winsup/mingw/mingwex
parentc7a8c97efbcad5b48f6822817b3a07ab740fd6ae (diff)
2003-09-22 Roland Schwingel <rolandschwingel@users.sourceforge.net>
* mingwex/dirent.c (_topendir): Allocate enough memory for DIR struct in UNICODE case too.
Diffstat (limited to 'winsup/mingw/mingwex')
-rw-r--r--winsup/mingw/mingwex/dirent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/mingw/mingwex/dirent.c b/winsup/mingw/mingwex/dirent.c
index 20d1921d7..e3c81e1b2 100644
--- a/winsup/mingw/mingwex/dirent.c
+++ b/winsup/mingw/mingwex/dirent.c
@@ -76,8 +76,8 @@ _topendir (const _TCHAR *szPath)
/* Allocate enough space to store DIR structure and the complete
* directory path given. */
- nd = (_TDIR *) malloc (sizeof (_TDIR) + _tcslen (szFullPath) + _tcslen (SLASH) +
- _tcslen (SUFFIX));
+ nd = (_TDIR *) malloc (sizeof (_TDIR) + (_tcslen(szFullPath) + _tcslen (SLASH) +
+ _tcslen(SUFFIX) + 1) * sizeof(_TCHAR));
if (!nd)
{