diff options
| author | 2026-03-23 16:40:11 +0100 | |
|---|---|---|
| committer | 2026-03-23 16:42:04 +0100 | |
| commit | 0f0713975d409652113935cd7e43df2aa5647e97 (patch) | |
| tree | b62ac413292620c27818355bc2661c3da2694741 /installer/ssh:/git@git.zx2c4.com | |
| parent | updater: do not verify EV status (diff) | |
| download | wireguard-windows-0f0713975d409652113935cd7e43df2aa5647e97.tar.xz wireguard-windows-0f0713975d409652113935cd7e43df2aa5647e97.zip | |
conf: fix length calculation on rename operation
This actually wasn't a problem before, because Windows ignores the
length field when not renaming to an alternative data stream:
FileName = lpFileInformation->FileName;
if ( lpFileInformation->FileNameLength >= 2 && *FileName == ':' )
{
FileNameLength = lpFileInformation->FileNameLength;
Src.MaximumLength = FileNameLength;
Src.Length = FileNameLength;
Src.Buffer = lpFileInformation->FileName;
}
else
{
status = RtlDosPathNameToNtPathName_U_WithStatus(FileName, &Src, 0, 0);
if ( status < 0 )
{
v15 = status;
LABEL_19:
BaseSetLastNTError(v15);
return 0;
}
FileNameLength = Src.Length;
}
Nonetheless, it's clear from this code (>=2) and the documentation that
the length field is intended to be in bytes, not chars. So fix that.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'installer/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
