hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.07k stars 113 forks source link

Fix potential out of bounds array access #889

Closed danielgustafsson closed 2 years ago

danielgustafsson commented 2 years ago

The specs array member in the EventColPolicy structure is accessed by traversing it from 0 to EVENT_COLUMN_TYPE_LAST, but the array was built using MAX_COL_SPECS from the ColPolicy structure as the array size.

Not sure why this hasn't triggered an error before, am I missing something obvious?