From 74e90e956844dfe5f2225762b1b47f205efa1b7a Mon Sep 17 00:00:00 2001 From: ruti <> Date: Fri, 3 May 2024 11:49:21 +0300 Subject: [PATCH] fix: overwriting temp path --- desync.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desync.c b/desync.c index 281c858..e402433 100644 --- a/desync.c +++ b/desync.c @@ -233,13 +233,13 @@ ssize_t send_fake(int sfd, char *buffer, } size_t psz = pkt.size; - char path[MAX_PATH + 1]; - int ps = GetTempPath(sizeof(path), path); + char path[MAX_PATH], temp[MAX_PATH]; + int ps = GetTempPath(sizeof(temp), temp); if (!ps) { uniperror("GetTempPath"); return -1; } - if (!GetTempFileName(path, "t", 0, path)) { + if (!GetTempFileName(temp, "t", 0, path)) { uniperror("GetTempFileName"); return -1; }