forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd5de344
committed
In array_position()/array_positions(), beware of empty input array.
These functions incautiously fetched the array's first lower boundeven when the array is zero-dimensional, thus fetching the wordafter the allocated array space. While almost always harmless,with very bad luck this could result in SIGSEGV. Fix by addingan early exit for empty input.Per bug #17920 from Alexander Lakhin.Discussion:https://postgr.es/m/17920-f7c228c627b6d02e%40postgresql.org1 parent9d51733 commitd5de344
1 file changed
+12
-4
lines changedLines changed: 12 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
651 | 651 |
| |
652 | 652 |
| |
653 | 653 |
| |
654 |
| - | |
655 | 654 |
| |
656 | 655 |
| |
657 | 656 |
| |
| |||
662 | 661 |
| |
663 | 662 |
| |
664 | 663 |
| |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
665 | 668 |
| |
666 | 669 |
| |
667 | 670 |
| |
| |||
676 | 679 |
| |
677 | 680 |
| |
678 | 681 |
| |
| 682 | + | |
679 | 683 |
| |
680 | 684 |
| |
681 | 685 |
| |
| |||
801 | 805 |
| |
802 | 806 |
| |
803 | 807 |
| |
804 |
| - | |
805 |
| - | |
806 |
| - | |
807 | 808 |
| |
808 | 809 |
| |
809 | 810 |
| |
| |||
816 | 817 |
| |
817 | 818 |
| |
818 | 819 |
| |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
819 | 824 |
| |
820 | 825 |
| |
821 | 826 |
| |
| |||
830 | 835 |
| |
831 | 836 |
| |
832 | 837 |
| |
| 838 | + | |
| 839 | + | |
| 840 | + | |
833 | 841 |
| |
834 | 842 |
| |
835 | 843 |
| |
|
0 commit comments
Comments
(0)