On 2020/09/02 0:14, Tom Lane wrote:
Fujii Masao <masao.fu...@oss.nttdata.com> writes:
The patch looks good to me, except the following minor thing.
+               if (fgets(buf.data + buf.len, buf.maxlen - buf.len - 1, fp) == 
NULL)
IIUC fgets() reads the data with the specified size - 1, so ISTM that -1 of
"buf.maxlen - buf.len - 1" is not necessary.

Good point, I was being unduly conservative.  Thanks for reviewing
the patch!

Thanks for committing the patch!

The patch was back-patched to v13, but v13 release note still has the following 
item.

    Tighten libpq's overlength-line handling and comment detection for .pgpass 
files (Fujii Masao)

This should be changed to the following or something?

    Teach libpq to handle arbitrary-length lines in .pgpass files (Tom Lane)

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION


Reply via email to