Re: Remove line length restriction in passwordFromFile()
От | Fujii Masao |
---|---|
Тема | Re: Remove line length restriction in passwordFromFile() |
Дата | |
Msg-id | 12eff40e-80df-244e-86b8-c60b0e88bc75@oss.nttdata.com обсуждение исходный текст |
Ответ на | Re: Remove line length restriction in passwordFromFile() (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Remove line length restriction in passwordFromFile()
|
Список | pgsql-hackers |
On 2020/09/02 0:14, Tom Lane wrote: > Fujii Masao <masao.fujii@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
В списке pgsql-hackers по дате отправления: