Commit 0a9118c
committed
ecpg: Fix error handling on OOMs when parsing timestamps
pgtypes_alloc() can return NULL when failing an allocation, which is
something that PGTYPEStimestamp_defmt_asc() has forgotten about when
translating a timestamp for 'D', 'r', 'R' and 'T' as these require a
temporary allocation.
This is unlikely going to be a problem in practice, so no backpatch is
done.
Author: Oleg Tselebrovskiy
Discussion: https://postgr.es/m/bf47888585149f83b276861a1662f7e4@postgrespro.ru1 parent a6c2188 commit 0a9118c
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2659 | 2659 | | |
2660 | 2660 | | |
2661 | 2661 | | |
| 2662 | + | |
| 2663 | + | |
2662 | 2664 | | |
2663 | 2665 | | |
2664 | 2666 | | |
| |||
2784 | 2786 | | |
2785 | 2787 | | |
2786 | 2788 | | |
| 2789 | + | |
| 2790 | + | |
2787 | 2791 | | |
2788 | 2792 | | |
2789 | 2793 | | |
| |||
2792 | 2796 | | |
2793 | 2797 | | |
2794 | 2798 | | |
| 2799 | + | |
| 2800 | + | |
2795 | 2801 | | |
2796 | 2802 | | |
2797 | 2803 | | |
| |||
2837 | 2843 | | |
2838 | 2844 | | |
2839 | 2845 | | |
| 2846 | + | |
| 2847 | + | |
2840 | 2848 | | |
2841 | 2849 | | |
2842 | 2850 | | |
| |||
0 commit comments