forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1e01374
committed
Fix overflow in Windows replacement pg_pread/pg_pwrite.
When calling the Windows file I/O APIs there is an implicit conversionfrom size_t to DWORD, which could overflow. Clamp the size at 1GB toavoid that.Not a really a live bug as we don't expect anything in PostgreSQL tocall with such large values.Reviewed-by: Peter Eisentraut <peter@eisentraut.org>Discussion:https://postgr.es/m/1672202.1703441340%40sss.pgh.pa.us1 parent653b55b commit1e01374
2 files changed
+6
-0
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 |
| |
34 | 37 |
| |
35 | 38 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 |
| |
34 | 37 |
| |
35 | 38 |
| |
|
0 commit comments
Comments
(0)