[out-of-bounds] fix oob reads

This commit is contained in:
akallabeth 2025-03-11 09:24:02 +01:00
parent 7e0e62c5ce
commit 3d9dcaece7
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
3 changed files with 3 additions and 2 deletions

View File

@ -1116,7 +1116,7 @@ BOOL rpc_client_write_call(rdpRpc* rpc, wStream* s, UINT16 opnum)
CopyMemory(&buffer[offset], &request_pdu.auth_verifier.auth_type, 8);
offset += 8;
if (offset > UINT32_MAX)
if (offset > request_pdu.header.frag_length)
goto fail;
plaintext.pvBuffer = buffer;

View File

@ -256,7 +256,7 @@ void* UwacClipboardDataGet(UwacSeat* seat, const char* mime, size_t* size)
data = tmp;
if (pos > alloc)
if (pos >= alloc)
goto fail;
r = read(pipefd[0], &data[pos], alloc - pos);

View File

@ -181,6 +181,7 @@ static BOOL IniFile_Load_File(wIniFile* ini, const char* filename)
goto out_file;
ini->buffer[fileSize] = '\n';
ini->buffer[fileSize + 1] = '\0';
IniFile_Load_NextLine(ini, ini->buffer);
rc = TRUE;