mirror of
https://github.com/hufrea/byedpi.git
synced 2025-01-03 04:49:47 +00:00
fix: overwriting temp path
This commit is contained in:
parent
d2da43aa82
commit
74e90e9568
6
desync.c
6
desync.c
@ -233,13 +233,13 @@ ssize_t send_fake(int sfd, char *buffer,
|
|||||||
}
|
}
|
||||||
size_t psz = pkt.size;
|
size_t psz = pkt.size;
|
||||||
|
|
||||||
char path[MAX_PATH + 1];
|
char path[MAX_PATH], temp[MAX_PATH];
|
||||||
int ps = GetTempPath(sizeof(path), path);
|
int ps = GetTempPath(sizeof(temp), temp);
|
||||||
if (!ps) {
|
if (!ps) {
|
||||||
uniperror("GetTempPath");
|
uniperror("GetTempPath");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!GetTempFileName(path, "t", 0, path)) {
|
if (!GetTempFileName(temp, "t", 0, path)) {
|
||||||
uniperror("GetTempFileName");
|
uniperror("GetTempFileName");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user