mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-25 22:09:24 +00:00
Merge pull request #512 from nulltoken/fix/mktemp-segfault
Prevent segfaulting on Windows when building a temporary filename
This commit is contained in:
commit
dcb7447cba
@ -365,7 +365,7 @@ extern int p_creat(const char *path, mode_t mode);
|
||||
int p_mkstemp(char *tmp_path)
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
if (_mktemp_s(tmp_path, GIT_PATH_MAX) != 0)
|
||||
if (_mktemp_s(tmp_path, strlen(tmp_path) + 1) != 0)
|
||||
return GIT_EOSERR;
|
||||
#else
|
||||
if (_mktemp(tmp_path) == NULL)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user