forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit52c6c0f
committed
Avoid possible overflow with ltsGetFreeBlock() in logtape.c
nFreeBlocks, defined as a long, stores the number of free blocks in alogical tape. ltsGetFreeBlock() has been using an int to store thevalue of nFreeBlocks, which could lead to overflows on platforms wherelong and int are not the same size (in short everything except Windowswhere long is 4 bytes).The problematic intermediate variable is switched to be a long insteadof an int.Issue introduced byc02fdc9, so backpatch down to 13.Author: Ranier vilelaReviewed-by: Peter Geoghegan, David RowleyDiscussion:https://postgr.es/m/CAEudQApLDWCBR_xmwNjGBrDo+f+S4E87x3s7-+hoaKqYdtC4JQ@mail.gmail.comBackpatch-through: 131 parent9b581c5 commit52c6c0f
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
372 | 372 |
| |
373 | 373 |
| |
374 | 374 |
| |
375 |
| - | |
| 375 | + | |
376 | 376 |
| |
377 | 377 |
| |
378 | 378 |
| |
|
0 commit comments
Comments
(0)