Re: function lca('{}'::ltree[]) caused DB Instance crash
Pierre Ducroquet <p.psql@pinaraf.info>
From: Pierre Ducroquet <p.psql@pinaraf.info>
To: pgsql-hackers@postgresql.org
Date: 2018-07-13T10:48:35Z
Lists: pgsql-bugs, pgsql-hackers
Attachments
- 0001-Fix-segfault-with-lca-ltree.patch (text/x-patch)
On Friday, July 13, 2018 12:09:20 PM CEST 李海龙 wrote: > HI,Oleg && pgsql-hackers > > Plese help me to check this is a bug of ltree? > Hi There is indeed a bug. The _lca function in _ltree_op.c tries to allocate 0 bytes of memory, doesn't initialize it and dereference it in lca_inner. The attached basic patch fixes it. Regards Pierre
Commits
-
Fix crash in contrib/ltree's lca() function for empty input array.
- f8e8be7f2f9e 9.4.19 landed
- dbd7f4e7c433 11.0 landed
- cbbe75fe6719 9.3.24 landed
- ac6b69c1959f 9.5.14 landed
- 330cad2c4b9a 9.6.10 landed
- 28a1ae5342fe 12.0 landed
- 1f47eb08cb42 10.5 landed