forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8fff8a8
committed
Validate the OID argument of pg_import_system_collations().
"SELECT pg_import_system_collations(0)" caused an assertion failure.With a random nonzero argument --- or indeed with zero, in non-assertbuilds --- it would happily make pg_collation entries with garbagevalues of collnamespace. These are harmless as far as I can tell(unless maybe the OID happens to become used for a schema, later on?).In any case this isn't a security issue, since the function issuperuser-only. But it seems like a gotcha for unwary DBAs, so let'sadd a check that the given OID belongs to some schema.Back-patch to v10 where this function was introduced.1 parentc267ca6 commit8fff8a8
1 file changed
+5
-3
lines changedLines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
521 | 521 |
| |
522 | 522 |
| |
523 | 523 |
| |
524 |
| - | |
525 |
| - | |
526 |
| - | |
527 | 524 |
| |
528 | 525 |
| |
529 | 526 |
| |
530 | 527 |
| |
531 | 528 |
| |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
532 | 534 |
| |
533 | 535 |
| |
534 | 536 |
| |
|
0 commit comments
Comments
(0)