[out-of-bounds] fix oob reads

This commit is contained in:
akallabeth
2025-03-11 09:24:02 +01:00
parent 7e0e62c5ce
commit 3d9dcaece7
3 changed files with 3 additions and 2 deletions

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);