Re: [PATCH] readlink missing nul-termination in pg_rewind - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] readlink missing nul-termination in pg_rewind
Date
Msg-id 15619.1432828370@sss.pgh.pa.us
Whole thread Raw
In response to [PATCH] readlink missing nul-termination in pg_rewind  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
List pgsql-hackers
Abhijit Menon-Sen <ams@2ndQuadrant.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



pgsql-hackers by date:

Previous
From: Abhijit Menon-Sen
Date:
Subject: [PATCH] readlink missing nul-termination in pg_rewind
Next
From: Robert Haas
Date:
Subject: Re: About that re-release ...