projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea89346
)
[CRT]
author
Amine Khaldi
<amine.khaldi@reactos.org>
Thu, 22 May 2014 20:59:46 +0000
(20:59 +0000)
committer
Amine Khaldi
<amine.khaldi@reactos.org>
Thu, 22 May 2014 20:59:46 +0000
(20:59 +0000)
* Update _wtmpnam() and tmpnam().
CORE-8080
svn path=/trunk/; revision=63417
reactos/lib/sdk/crt/stdio/file.c
patch
|
blob
|
history
diff --git
a/reactos/lib/sdk/crt/stdio/file.c
b/reactos/lib/sdk/crt/stdio/file.c
index
254bf1f
..
36a0109
100644
(file)
--- a/
reactos/lib/sdk/crt/stdio/file.c
+++ b/
reactos/lib/sdk/crt/stdio/file.c
@@
-3718,6
+3718,7
@@
char * CDECL tmpnam(char *s)
{
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
@@
wchar_t * CDECL _wtmpnam(wchar_t *s)
{
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;