forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbf4717b
committed
Fix off-by-one loop termination condition in pg_stat_get_subscription().
pg_stat_get_subscription scanned one more LogicalRepWorker array entrythan is really allocated. In the worst case this could lead to SIGSEGV,if the LogicalRepCtx data structure is near the end of shared memory.That seems quite unlikely though (thanks to the ordering of calls inCreateSharedMemoryAndSemaphores) and we've heard no field reports of it.A more likely misbehavior is one row of garbage data in the function'sresult, but even that is not real likely because of the check that thepid field matches some live backend.Report and fix by Kuntal Ghosh. This bug is old, so back-patchto all supported branches.Discussion:https://postgr.es/m/CAGz5QCJykEDzW6jQK6Yz7Qh_PMtD=95de_7QoocbVR2Qy8hWZA@mail.gmail.com1 parent51da231 commitbf4717b
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
935 | 935 |
| |
936 | 936 |
| |
937 | 937 |
| |
938 |
| - | |
| 938 | + | |
939 | 939 |
| |
940 | 940 |
| |
941 | 941 |
| |
|
0 commit comments
Comments
(0)