forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfebda37
committed
Avoid platform-dependent infinite loop in pg_dump.
If malloc(0) returns NULL, the binary search in findSecLabels() willprobably go into an infinite loop when there are no security labels,because NULL-1 is greater than NULL after wraparound.(We've seen this pathology before ... I wonder whether there's a way todetect the class of bugs automatically?)Diagnosis and patch by Steve Singer, cosmetic adjustments by me1 parent37e66e7 commitfebda37
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
646 | | - | |
| 646 | + | |
| 647 | + | |
647 | 648 | | |
648 | | - | |
| 649 | + | |
649 | 650 | | |
650 | 651 | | |
651 | 652 | | |
| |||
11761 | 11762 | | |
11762 | 11763 | | |
11763 | 11764 | | |
| 11765 | + | |
| 11766 | + | |
| 11767 | + | |
| 11768 | + | |
| 11769 | + | |
| 11770 | + | |
11764 | 11771 | | |
11765 | 11772 | | |
11766 | 11773 | | |
| |||
0 commit comments
Comments
(0)