Re: pgsql: Fix out-of-bounds read in json_lex_string

2022-07-12 Thread Larry Rosenman
On 07/12/2022 1:07 am, Tom Lane wrote: I wrote: John Naylor writes: ld: error: unable to find library -lldap_r Agreed, that looks like some unrelated platform change. Larry? Upon further thought, this looks like fallout from an upgrade to OpenLDAP 2.5, which eliminated libldap_r. That s

Re: pgsql: Fix out-of-bounds read in json_lex_string

2022-07-11 Thread Tom Lane
I wrote: > John Naylor writes: >> ld: error: unable to find library -lldap_r > Agreed, that looks like some unrelated platform change. Larry? Upon further thought, this looks like fallout from an upgrade to OpenLDAP 2.5, which eliminated libldap_r. That should be fine, but you might need to bl

Re: pgsql: Fix out-of-bounds read in json_lex_string

2022-07-11 Thread Tom Lane
John Naylor writes: > On Tue, Jul 12, 2022 at 11:27 AM John Naylor > wrote: >> Fix out-of-bounds read in json_lex_string > The failure on peripatus (FreeBSD HEAD) seems completely unrelated to > the changes in the commit: > ld: error: unable to find library -lldap_r Agreed, that looks like som

Re: pgsql: Fix out-of-bounds read in json_lex_string

2022-07-11 Thread John Naylor
On Tue, Jul 12, 2022 at 11:27 AM John Naylor wrote: > > Fix out-of-bounds read in json_lex_string The failure on peripatus (FreeBSD HEAD) seems completely unrelated to the changes in the commit: ld: error: unable to find library -lldap_r clang: error: linker command failed with exit code 1 (use

pgsql: Fix out-of-bounds read in json_lex_string

2022-07-11 Thread John Naylor
Fix out-of-bounds read in json_lex_string Commit 3838fa269 added a lookahead loop to allow building strings multiple bytes at a time. This loop could exit because it reached the end of input, yet did not check for that before checking if we reached the end of a valid string. To fix, put the end of