[clang,warnings] fix Wjump-misses-init

This commit is contained in:
Armin Novak
2026-01-08 10:32:31 +01:00
parent 54f419c1b7
commit 371da1cd2f

View File

@@ -1032,17 +1032,21 @@ static BOOL pf_channel_rdpdr_rewrite_device_list_to(wStream* s, UINT32 fromVersi
wStream* clone = Stream_New(NULL, cap);
if (!clone)
goto fail;
{
const size_t pos = Stream_GetPosition(s);
Stream_Copy(s, clone, cap);
Stream_SealLength(clone);
Stream_SetPosition(clone, 0);
Stream_SetPosition(s, pos);
}
/* Skip device count */
if (!Stream_SafeSeek(s, 4))
goto fail;
{
UINT32 count = 0;
if (Stream_GetRemainingLength(clone) < 4)
goto fail;
@@ -1094,6 +1098,7 @@ static BOOL pf_channel_rdpdr_rewrite_device_list_to(wStream* s, UINT32 fromVersi
Stream_Write(s, device.DeviceData, device.DeviceDataLength);
}
}
}
Stream_SealLength(s);
rc = TRUE;