git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 653b55b) | patch
Fix overflow in Windows replacement pg_pread/pg_pwrite.
Sat, 2 Mar 2024 19:40:41 +0000 (08:40 +1300)
Sat, 2 Mar 2024 19:40:41 +0000 (08:40 +1300)
commit 1e013746544bd1f9df70f5547894fd72719c4b85
Fix overflow in Windows replacement pg_pread/pg_pwrite.

When calling the Windows file I/O APIs there is an implicit conversion
from size_t to DWORD, which could overflow. Clamp the size at 1GB to
avoid that.

Not a really a live bug as we don't expect anything in PostgreSQL to
call with such large values.

Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/1672202.1703441340%40sss.pgh.pa.us
src/port/win32pread.c diff | blob | blame | history
src/port/win32pwrite.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /