Author: akhaldi
Date: Thu May 22 20:59:46 2014
New Revision: 63417
URL:
http://svn.reactos.org/svn/reactos?rev=63417&view=rev
Log:
[CRT]
* Update _wtmpnam() and tmpnam().
CORE-8080
Modified:
trunk/reactos/lib/sdk/crt/stdio/file.c
Modified: trunk/reactos/lib/sdk/crt/stdio/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdio/file.c?r…
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/stdio/file.c [iso-8859-1] Thu May 22 20:59:46 2014
@@ -3718,6 +3718,7 @@
{
size = int_to_base32(tmpnam_unique++, tmpstr);
memcpy(p, tmpstr, size);
+ p[size] = '\0';
if (GetFileAttributesA(s) == INVALID_FILE_ATTRIBUTES &&
GetLastError() == ERROR_FILE_NOT_FOUND)
break;
@@ -3749,6 +3750,7 @@
{
size = int_to_base32_w(tmpnam_unique++, tmpstr);
memcpy(p, tmpstr, size*sizeof(wchar_t));
+ p[size] = '\0';
if (GetFileAttributesW(s) == INVALID_FILE_ATTRIBUTES &&
GetLastError() == ERROR_FILE_NOT_FOUND)
break;