forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit558cf80
committed
bufmgr: Fix undefined behaviour with, unrealistically, large temp_buffers
Quoting Melanie:> Since if buffer is INT_MAX, then the -(buffer + 1) version invokes> undefined behavior while the -buffer - 1 version doesn't.All other places were already using the correct version. I (Andres), copiedthe code into more places in a patch. Melanie caught it in review, but toprevent more people from copying the bad code, fix it. Even if it is atheoretical issue.We really ought to wrap these accesses in a helper function...As this is a theoretical issue, don't backpatch.Reported-by: Melanie Plageman <melanieplageman@gmail.com>Discussion:https://postgr.es/m/CAAKRu_aW2SX_LWtwHgfnqYpBrunMLfE9PD6-ioPpkh92XH0qpg@mail.gmail.com1 parente9d202a commit558cf80
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
305 | 305 |
| |
306 | 306 |
| |
307 | 307 |
| |
308 |
| - | |
| 308 | + | |
309 | 309 |
| |
310 | 310 |
| |
311 | 311 |
| |
|
0 commit comments
Comments
(0)