- Notifications
You must be signed in to change notification settings - Fork5
Commitcf22e85
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 parent409b8c7 commitcf22e85
1 file changed
+9
-2
lines changedLines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
645 | 645 |
| |
646 | 646 |
| |
647 | 647 |
| |
648 |
| - | |
| 648 | + | |
| 649 | + | |
649 | 650 |
| |
650 |
| - | |
| 651 | + | |
651 | 652 |
| |
652 | 653 |
| |
653 | 654 |
| |
| |||
11993 | 11994 |
| |
11994 | 11995 |
| |
11995 | 11996 |
| |
| 11997 | + | |
| 11998 | + | |
| 11999 | + | |
| 12000 | + | |
| 12001 | + | |
| 12002 | + | |
11996 | 12003 |
| |
11997 | 12004 |
| |
11998 | 12005 |
| |
|
0 commit comments
Comments
(0)