Re: [PATCH] readlink missing nul-termination in pg_rewind

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: Re: [PATCH] readlink missing nul-termination in pg_rewind
Date: 2015-05-28 15:52:50
Message-ID: 15619.1432828370@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> writes:
> This is just something I noticed in passing. (I did a quick check of all
> the other uses of readlink in the source, and they do get this right.)

There's more random inconsistency than just this. I think we should
standardize on the coding exhibited at, eg, basebackup.c:1023ff, which
positively ensures that it won't scribble on random memory if the
call returns an unexpected value. Will fix.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-05-28 16:05:37 Re: About that re-release ...
Previous Message Tom Lane 2015-05-28 15:43:52 Re: WIP: Enhanced ALTER OPERATOR